FE-Theme is a styled-component based comprehensive library of accessible, reusable, and composable React components that streamlines the development of modern web applications and websites. The library offers a theme based UI to quickly start a new small/medium/large size web based applications.
- 🚀 Features
- 📦 Installation
- 💻 Usage
- 📚 Online Editor Templates
- 📝 Contributing
- ✨ Contributors
- ⚖️ License
- Theme: FE-Theme provides themeable based UI component, and are easy to configure.
- Web/Mobile Support: FE-theme will be helpfull in Large/Mid/Small size of web based applications.
- Ease of Styling: FE-Theme contains a set of layout components like
ButtonandInputthat make it easy to style your components by passing props. - Advancement: FE-Theme provide a variety of advance plug and play component like
Voice Search,Share,Contact List,Live Location Tracking,Current Locationetc. - Scalable & Maintainable: FE-Theme components are built on top of a React UI and Styled-Component for better scalable, maintainable component.
- Accessiblity Support: FE-Theme components follow the accessiblity guidelines specifications and have the right
aria-*attributes. - Dark Mode UI: FE-Theme support dark mode compatibility.
Install fe-theme package using any package manager
# with Yarn
$ yarn add fe-theme
# with npm
$ npm i fe-theme --save
# with pnpm
$ pnpm add fe-theme
# with Bun
$ bun add fe-themeimport { ThemeProvider } from 'styled-components'; // import ThemeProvider component
import init from 'fe-theme/init'; // import Init function
import App from './App';
ReactDOM.createRoot(document.getElementById('root')).render(
// Wrap your application with ThemeProvider
<ThemeProvider theme={init()}>
<App />
</ThemeProvider>
);import Button from 'fe-theme/Button';
<Button />Wow, the configuration is quite simple, but wait... button design is different in my application. No worry, follow step 3, 4.
a) Create an empty folder called fe-theme-config in your application at any location.
c) Create configButton.js file inside fe-theme-config folder (To configure Button Component)
const Button = {
"borderRadius": "50px",
"borderColor": "12px",
"primary": {
"color": "white",
"borderColor": "white"
},
"secondary": {
"color": "white",
"borderColor": "white"
}
}
export default Button; Note Config file name start with config keyword along with component Name like configButton.js/configInput.js
c) Create theme.js file and include configButton.js
import Button from '../configButton';
export default {
Button,
};Yeah, We have created config files Mannually but You can also generate config files automatically using command line Check Commands
import { ThemeProvider } from 'styled-components';
import init from 'fe-theme/init';
import theme from '{PATH}/fe-theme-config/theme'; // Include your theme to fe-theme
import App from './App';
ReactDOM.createRoot(document.getElementById('root')).render(
// Inside the Init function pass theme
<ThemeProvider theme={init(theme)}>
<App />
</ThemeProvider>
);Note: PATH is a variable i.e. location of config files in your application
Hurrah...!!! Now you can change button(any compponent) property according to your application
Your Application Folder(Root Directory)
└──fe-theme-config
├──configButton
├──configInput
└──configChip
Play around the property of component according to your project.
- JavaScript Starter: https://codesandbox.io/p/devbox/fe-theme-js-6q2vcg
- JavaScript Starter: https://stackblitz.com/edit/fe-theme-js-b6mri2
Feel like contributing? Most welcome! Setup locally to get fe-theme working on your local machine and guide lines to contribute in fe-theme.
Thanks goes to these wonderful people
|
Himanshu Gupta |
Ashwini Hegde |
Vineet Gupta |
Alok Dubey |
Ravi Verma |
Semantic Release Bot |
Ghanshyam KD |
|
Fossa Bot |
Swaraj Singh |
Abhinav Gupta |
Hardik Jain |
MIT © Himanshu Gupta