Comments (11)
Have you checked whether the CSS
bg-gray-400
is applied using developer tools? Share yourtailwind.config.js
- my guess is you are missing step 2 of the install guide https://github.com/themesberg/flowbite-react#install-flowbite-react
install properly apply but not chage background color becuase defult color not remove
from flowbite-react.
Have you checked whether the CSS bg-gray-400
is applied using developer tools? Share your tailwind.config.js
- my guess is you are missing step 2 of the install guide https://github.com/themesberg/flowbite-react#install-flowbite-react
from flowbite-react.
@nishant-vagh The best approach to customize complex elements such as Sidebar
is to use the theme system. Some of the classes/styles that you are trying to change are part of the inner component's objects.
from flowbite-react.
@nishant-vagh The best approach to customize complex elements such as
Sidebar
is to use the theme system. Some of the classes/styles that you are trying to change are part of the inner component's objects.
i have also try but
@nishant-vagh The best approach to customize complex elements such as
Sidebar
is to use the theme system. Some of the classes/styles that you are trying to change are part of the inner component's objects.
from flowbite-react.
Have you tried to use this approach? https://www.flowbite-react.com/docs/customize/theme#option-3-create-a-reusable-component-with-a-custom-theme
from flowbite-react.
Have you tried to use this approach? https://www.flowbite-react.com/docs/customize/theme#option-3-create-a-reusable-component-with-a-custom-theme
yes i have try it
but still not work
from flowbite-react.
@nishant-vagh could you please create an example at codesandbox so someone can investigate the issue?
from flowbite-react.
>
@nishant-vagh could you please create an example at codesandbox so someone can investigate the issue?
https://github.com/niks200/sandbox.git
https://codesandbox.io/p/github/niks200/sandbox/main?workspaceId=613aa74a-900e-4c82-ab21-7f2270f174f7
from flowbite-react.
Your sandbox isn't accessible. Let me know if you can still reproduce this.
from flowbite-react.
from flowbite-react.
It looks like all you need to do is apply the color to the root.inner
theme specifically, since a bg-gray-50
is currently supplied there.
That looks like:
import { Sidebar, theme } from 'flowbite-react';
import { twMerge } from 'tailwind-merge';
<Sidebar theme={{
inner: twMerge(theme.sidebar.root.inner, "bg-pink-800")
}}>
..
</Sidebar>
This obviously isn't optimal - we should definitely consider moving all or most of the styling out of this inner
key to make it more intuitive. E.g., you should be able to just do this with className
without hacks. You can actually do it with className
as well by specifying the inner <div>
as the target - e.g., <Sidebar className="[&>div]:bg-pink-800">
I tested on your Code Sandbox and each of those works just fine.
from flowbite-react.
Related Issues (20)
- Popover listed in documentation but not available in current release (0.7.2) HOT 2
- JSX element type 'Tabs' does not have any construct or call signatures. HOT 8
- Support for placeholder in Dropdown HOT 1
- default color change HOT 7
- The default background color of the modal does not appear HOT 5
- Dynamically generated buttons within a button group are not properly styled. HOT 1
- Customization of button content in Dropdown
- bug: date immediately prior to `minDate` in Datepicker still selectable / maxDate not selectable HOT 2
- Popover component not exported but listed in docs HOT 8
- Programatically Scroll Modal.Body to the top HOT 1
- Allow Avatar as a Timeline.Point HOT 3
- Cannot use Table.HeadCell outside Table.Head HOT 2
- `Link` from react-router-dom isn't working with Navbar.Link & Sidebar.Link HOT 7
- On the Datepicker, Friday and Saturday aren't displaying the date under them? HOT 2
- Carousel init bug HOT 1
- Popover component not exported but listed in docs HOT 1
- Next.js Failed to build - Cannot get final name for export HOT 1
- Suggesting adding `node_modules` to Tailwind configuration slowing down application HOT 5
- npm deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) HOT 4
- Tooltip should have a flag for "interactive". HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowbite-react.