4.1.6 • Published 3 months ago

fe-theme v4.1.6

Weekly downloads
1
License
MIT
Repository
github
Last release
3 months ago

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.

Table of contents

  1. 🚀 Features
  2. 📦 Installation
  3. 💻 Usage
  4. ⚙️ Customization
  5. 📚 Online Editor Templates
  6. 📝 Contributing
  7. Contributors
  8. ⚖️ License

Features

  • 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 Button and Input that 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 Location etc.
  • 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.

Installation

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-theme

Usage

1. Use fe-theme in your application using themeProvider

import { 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>
);

2. You are good to go and import fe-theme component in your application

import Button from 'fe-theme/Button';

<Button />

  Wow, the configuration is quite simple, but wait... button design is different in your application.   No worry, Checkout Customization.

Customization

1. Create your own theme

==> To Generate config files for components Automatically using command line Check Commands.

==> To create config files for components Manually, follow steps given below.

   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 = {
  primary: {
    color: configColor.white,
    background: configColor.themeColor,
    borderColor: configColor.themeColor,
    borderRadius: '4px',
  },
  outlined: {
    color: configColor.themeColor,
    bgColor: configColor.white,
    borderColor: configColor.themeColor,
    borderRadius: '14px',
  },
  size: {
    s: { fontSize: 'xs', padding: [1, 2] },
    m: { fontSize: 's', padding: [1.5, 2] },
    l: {  fontSize: 's',  padding: [2, 2.5] },
  },
  extraProps: {},
};

export default Button;

   Note Config file name start with config keyword along with component Name like configButton.js or configInput.js

   c) Create theme.js file and include configButton.js

import Button from '../configButton';

export default {
  Button,
};

2. Pass the newly created theme file in init function

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.

Online Editor Templates

1. CodeSandbox

2. Stackblitz

Contributing

Feel like contributing? Most welcome! Setup locally to get fe-theme working on your local machine and guide lines to contribute in fe-theme.

Contributors

Thanks goes to these wonderful people

License

MIT © Himanshu Gupta

4.1.4

3 months ago

4.1.3

3 months ago

4.1.6

3 months ago

4.1.5

3 months ago

4.1.2

3 months ago

4.1.1

3 months ago

4.1.0

3 months ago

4.0.62

3 months ago

4.0.61

4 months ago

4.0.60

4 months ago

4.0.59

4 months ago

4.0.58

4 months ago

4.0.56

4 months ago

4.0.57

4 months ago

4.0.52

4 months ago

4.0.51

4 months ago

4.0.54

4 months ago

4.0.53

4 months ago

4.0.50

4 months ago

4.0.55

4 months ago

4.0.49

4 months ago

4.0.48

4 months ago

4.0.47

4 months ago

4.0.46

4 months ago

4.0.41

4 months ago

4.0.40

4 months ago

4.0.43

4 months ago

4.0.42

4 months ago

4.0.45

4 months ago

4.0.44

4 months ago

4.0.38

4 months ago

4.0.37

4 months ago

4.0.39

4 months ago

4.0.36

5 months ago

4.0.19

5 months ago

4.0.21

5 months ago

4.0.20

5 months ago

4.0.27

5 months ago

4.0.26

5 months ago

4.0.23

5 months ago

4.0.22

5 months ago

4.0.25

5 months ago

4.0.24

5 months ago

4.0.31

5 months ago

4.0.34

5 months ago

4.0.35

5 months ago

4.0.16

5 months ago

4.0.18

5 months ago

4.0.17

5 months ago

4.0.14

5 months ago

4.0.13

5 months ago

4.0.10

5 months ago

4.0.12

5 months ago

4.0.11

5 months ago

4.0.9

5 months ago

4.0.8

5 months ago

4.0.5

5 months ago

4.0.4

5 months ago

4.0.7

5 months ago

4.0.6

5 months ago

4.0.3

5 months ago

4.0.2

5 months ago

2.29.0

5 months ago

2.25.0

5 months ago

2.27.0

5 months ago

2.0.3

5 months ago

2.11.0

5 months ago

2.0.2

5 months ago

2.2.0

5 months ago

2.0.5

5 months ago

2.0.4

5 months ago

2.4.0

5 months ago

2.0.7

5 months ago

2.0.6

5 months ago

2.6.0

5 months ago

2.30.0

5 months ago

2.0.8

5 months ago

2.8.0

5 months ago

2.0.1

5 months ago

3.0.3

5 months ago

3.0.2

5 months ago

3.0.1

5 months ago

2.19.0

5 months ago

2.17.0

5 months ago

3.0.0

5 months ago

2.15.0

5 months ago

2.13.0

5 months ago

2.20.0

5 months ago

2.22.0

5 months ago

4.0.1

5 months ago

4.0.0

5 months ago

2.28.0

5 months ago

2.24.0

5 months ago

2.26.0

5 months ago

2.3.0

5 months ago

2.12.0

5 months ago

2.5.0

5 months ago

2.10.0

5 months ago

2.7.0

5 months ago

2.9.0

5 months ago

2.1.0

5 months ago

3.3.1

5 months ago

3.1.1

5 months ago

3.1.0

5 months ago

3.3.5

5 months ago

3.3.4

5 months ago

3.3.3

5 months ago

3.3.2

5 months ago

2.16.0

5 months ago

2.21.0

5 months ago

2.23.0

5 months ago

2.0.0

4 years ago

1.0.0

4 years ago