React Navbar - Flowbite
The navbar component can be used to show a list of navigation links positioned on the top side of your page based on multiple layouts, sizes, and dropdowns
Get started with the responsive navbar component from Flowbite to quickly set up a navigation menu for your website and set up the logo, list of pages, CTA button, search input, user profile options with a dropdown, and more.
Default navbar
<Navbar
fluid
rounded
>
<Navbar.Brand href="/navbars">
<img
alt="Flowbite Logo"
className="mr-3 h-6 sm:h-9"
src="https://flowbite.com/docs/images/logo.svg"
/>
<span className="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
Flowbite
</span>
</Navbar.Brand>
<Navbar.Toggle />
<Navbar.Collapse>
<Navbar.Link
active
href="/navbars"
>
Home
</Navbar.Link>
<Navbar.Link href="/navbars">
About
</Navbar.Link>
<Navbar.Link href="/navbars">
Services
</Navbar.Link>
<Navbar.Link href="/navbars">
Pricing
</Navbar.Link>
<Navbar.Link href="/navbars">
Contact
</Navbar.Link>
</Navbar.Collapse>
</Navbar>
Navbar with CTA button
<Navbar
fluid
rounded
>
<Navbar.Brand href="https://flowbite.com/">
<img
alt="Flowbite Logo"
className="mr-3 h-6 sm:h-9"
src="https://flowbite.com/docs/images/logo.svg"
/>
<span className="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
Flowbite
</span>
</Navbar.Brand>
<div className="flex md:order-2">
<Button>
Get started
</Button>
<Navbar.Toggle />
</div>
<Navbar.Collapse>
<Navbar.Link
active
href="/navbars"
>
Home
</Navbar.Link>
<Navbar.Link href="/navbars">
About
</Navbar.Link>
<Navbar.Link href="/navbars">
Services
</Navbar.Link>
<Navbar.Link href="/navbars">
Pricing
</Navbar.Link>
<Navbar.Link href="/navbars">
Contact
</Navbar.Link>
</Navbar.Collapse>
</Navbar>
Navbar with dropdown
<Navbar
fluid
rounded
>
<Navbar.Brand href="https://flowbite.com/">
<img
alt="Flowbite Logo"
className="mr-3 h-6 sm:h-9"
src="https://flowbite.com/docs/images/logo.svg"
/>
<span className="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
Flowbite
</span>
</Navbar.Brand>
<div className="flex md:order-2">
<Dropdown
inline
label={<Avatar alt="User settings" img="https://flowbite.com/docs/images/people/profile-picture-5.jpg" rounded/>}
>
<Dropdown.Header>
<span className="block text-sm">
Bonnie Green
</span>
<span className="block truncate text-sm font-medium">
name@flowbite.com
</span>
</Dropdown.Header>
<Dropdown.Item>
Dashboard
</Dropdown.Item>
<Dropdown.Item>
Settings
</Dropdown.Item>
<Dropdown.Item>
Earnings
</Dropdown.Item>
<Dropdown.Divider />
<Dropdown.Item>
Sign out
</Dropdown.Item>
</Dropdown>
<Navbar.Toggle />
</div>
<Navbar.Collapse>
<Navbar.Link
active
href="/navbars"
>
Home
</Navbar.Link>
<Navbar.Link href="/navbars">
About
</Navbar.Link>
<Navbar.Link href="/navbars">
Services
</Navbar.Link>
<Navbar.Link href="/navbars">
Pricing
</Navbar.Link>
<Navbar.Link href="/navbars">
Contact
</Navbar.Link>
</Navbar.Collapse>
</Navbar>