React Atoms is a comprehensive library providing fundamental, reusable 'atoms' for efficient and robust page-building in modern web applications. It includes a variety of pre-styled components with a customizable theme.
This library was created to help developers build web applications faster and more efficiently.
To install this library, run the following command:
npm install react-atoms
Or if you prefer using yarn:
yarn add react-atoms
First, import the MyThemeProvider
and your desired components from the library:
import MyThemeProvider from "react-atoms/MyThemeProvider";
import Circle from "react-atoms/Circle";
Then, define your custom theme:
const myTheme = {
primary: "#FF0000",
secondary: "#00FF00",
// ... other customizations
};
Finally, use MyThemeProvider
to wrap your components, passing in your custom theme:
function MyApp() {
return (
<MyThemeProvider theme={myTheme}>
<Circle diameter="100px" />
</MyThemeProvider>
);
}
TODO
This library was inspired by and built upon the knowledge shared in Alex Eagleson's tutorial: How to create and publish a react component library.
MIT
- Removed CJS build
- Add "backgroundColor" props to Button component