如何设置 Flowbite React 组件的样式

Njo*_*ian 5 reactjs flowbite

有没有办法设置 Flowbite React 组件的样式?就像,我如何使导航栏透明。

<Navbar fluid={true} rounded={true}></Navbar>

seg*_*ult 2

您可以使用 prop 来设置导航栏和其他 Flowbite React 组件的样式className

例如,要使导航栏透明,您可以使用以下 TailwindCSS:

<Navbar fluid={true} rounded={true} className="bg-transparent"></Navbar>
Run Code Online (Sandbox Code Playgroud)

请参阅导航栏来源:https://github.com/themesberg/flowbite-react/blob/cdea61e56e89ee023e8a5daa4c1743692b8a3899/src/lib/components/Navbar/index.tsx#L18

TailwindCSS 背景颜色文档:https://tailwindcss.com/docs/background-color

注意这假设您已根据此文档使用 Flowbite 设置 TailwindCSS: https: //flowbite.com/docs/getting-started/react/