react-dculus-daisyui
v2.0.28
Published
react-dculus-daisyui - DaisyUI components built with React ๐ผ
Downloads
28
Readme
Dculus react-dculus-daisyui ๐ผ
DaisyUI components built with React, Typescript and TailwindCSS.
๐ Check out our Storybook | ๐ฒ Try it with CodeSandbox
๐ Need help or have a suggestion? Join our discord!
๐ฟ Install
Make sure you've installed TailwindCSS and daisyUI.
Install the package with npm or yarn:
npm install react-dculus-daisyui
To prevent TailwindCSS from purging your styles, add the following line to your tailwind.config.js:
module.exports = {
content: [],
safelist: [
{
pattern: /./
},
],
...
plugins: [require("daisyui")],
}
โก Quick Start
Import react-dculus-daisyui components within your component files:
import { Button } from 'react-dculus-daisyui'
export default (props) => {
return <Button color="primary">Click me!</Button>
}
๐จ Themes
To apply a theme (or multiple themes) to a page or components, import the Theme component and wrap your content:
import { Theme, Button } from 'react-dculus-daisyui'
export default (props) => {
return (
<>
<Theme dataTheme="dark">
<Button color="primary">Click me, dark!</Button>
</Theme>
<Theme dataTheme="light">
<Button color="primary">Click me, light!</Button>
</Theme>
</>
)
}
Use tools like the official daisyUI Theme Generator or daisyUI Theme Builder to easily create your own themes.
โ๏ธ Components
- [x] Button
- [X] Dropdown
- [X] Modal
- [X] Swap
- [x] Alert
- [X] Avatar
- [X] Badge
- [X] Card
- [X] Carousel
- [X] Collapse
- [X] Countdown
- [X] Kbd
- [X] Progress
- [X] Radial Progress
- [X] Stats
- [X] Table
- [X] Tooltip
- [x] Checkbox
- [x] Input
- [x] Radio
- [x] Range
- [x] Rating
- [x] Select
- [x] Textarea
- [x] Toggle
- [x] Artboard
- [x] Button-Group
- [x] Divider
- [x] Drawer
- [x] Footer
- [x] Hero
- [x] Indicator
- [x] Input Group
- [x] Mask
- [x] Stack
- [x] Breadcrumbs
- [x] Link
- [x] Menu
- [x] Navbar
- [x] Pagination
- [x] Steps
- [x] Tabs
- [x] Code
- [x] Phone
- [x] Window
๐ค Contributing
We're looking for contributors to help write stories and unit tests for components.
Creating new components
Run npm run generate component ${your_new_component_name}
. The generator will ask a few questions and setup the component for you.
When you'e done, export the component from index.tsx
and open a PR.
Creating new stories
Check out the official daisyUI examples. ๐
License
This project is licensed under the MIT License - see the LICENSE.md file for details.