Skip to content
/ bui Public

BUI: Tailwind based React component library to build back-office platforms 🚀

License

Notifications You must be signed in to change notification settings

dd3tech/bui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BUI logo

A React ecosystem library for building back-office platforms like DD360.
It's library created by developers for developers

Stable v6

license npm latest package npm downloads Average time to resolve an issue CII Best Practices Storybook

BUI components

📲 Installation

npm install dd360-ds

or

yarn add dd360-ds

💅 Customize theme

If you want to use a provider to configure the library's theme, you can do so using the ThemeProvider provided by dd360-ds. This will allow you to set your own settings for the theme.

To use the ThemeProvider, you must import it as follows:

import { createTheme, ThemeProvider } from "dd360-ds/theme";

You can then create your own theme configuration using the createTheme function, which accepts an object with different properties to customize the theme. For example, you can define the primary and secondary colors as shown below:

const theme = createTheme({
  palette: {
    primary: {
      main: "purple"
    },
    secondary: {
      main: "#FFC107"
    }
  }
});

After creating your theme configuration, you can use the ThemeProvider to wrap your React app. This can be done as follows:

ReactDOM.createRoot(document.getElementById("root")).render(
  <StrictMode>
    <ThemeProvider theme={theme}>
      <App />
    </ThemeProvider>
  </StrictMode>
);

Within the ThemeProvider, you can use the components provided by dd360-ds and the corresponding styles will be applied based on your theme settings.

Remember that to use the ThemeProvider, you must import both the createTheme component and the ThemeProvider component from dd360-ds/theme.

💡 Usage

After Installation, you will have to make some extra configurations for everything to work normally.

Import stylesheets into the App.js or App.tsx

import 'dd360-ds/dd360.css'

⚠️ Warning: If you want to combine it with other styles, be sure to import our css as the last one.

How to import components?

import { Button } from 'dd360-ds'

🔫 Components

This is the most fun part. Below we will explain the use of the components we are currently developing.

You can checking and contribute to the docs website here