Skip to content

feat: add <MegaMenu> #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions content/docs/components/mega-menu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: React Mega Menu - Flowbite
description: Use the mega menu component as a full-width dropdown inside the navbar to show a list of menu items based on multiple sizes, variants, and styles
---

The mega menu component is a full-width dropdown that can be triggered by clicking on the menu item and it shows a list of links that you can use to navigate through the pages on a website.

Import the mega menu component from Flowbite React to use it:

```jsx
import { MegaMenu } from 'flowbite-react';
```

## Default mega menu

Use this example to show a list of links aligned on three columns inside the mega menu dropdown.

<Example name="megaMenu.root" />

## Mega menu with icons

This example of a mega menu dropdown can be used to also show an icon near the text of the link.

<Example name="megaMenu.icons" />

## Full width dropdown

Use this example to show a mega menu dropdown that spans the entire width of the document page.

<Example name="megaMenu.fullWidth" />

## Full width with CTA

This example can be used to also show a CTA button or link next to the menu items inside the dropdown.

<Example name="megaMenu.fullWidthCTA" />

## Full width with image

This example can be used to also show a CTA with a background image inside the dropdown next to the other menu items and links.

<Example name="megaMenu.fullWidthImage" />

## Theme

**This component is currently in development, and does not yet support a theme.**

## References

- [Flowbite Mega Menu](https://flowbite.com/docs/components/mega-menu/)
1 change: 1 addition & 0 deletions data/docs-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const DOCS_SIDEBAR: DocsSidebarSection[] = [
{ title: 'Forms', href: '/docs/components/forms' },
{ title: 'KBD', href: '/docs/components/kbd', isNew: true },
{ title: 'List group', href: '/docs/components/list-group' },
{ title: 'Mega menu', href: '/docs/components/mega-menu', isNew: true },
{ title: 'Modal', href: '/docs/components/modal' },
{ title: 'Navbar', href: '/docs/components/navbar' },
{ title: 'Pagination', href: '/docs/components/pagination' },
Expand Down
1 change: 1 addition & 0 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export * as forms from './forms';
export * as kbd from './kbd';
export * as listGroup from './listGroup';
export * as list from './list';
export * as megaMenu from './megaMenu';
export * as modal from './modal';
export * as navbar from './navbar';
export * as pagination from './pagination';
Expand Down
5 changes: 5 additions & 0 deletions examples/megaMenu/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { root } from './megaMenu.root';
export { icons } from './megaMenu.icons';
export { fullWidth } from './megaMenu.fullWidth';
export { fullWidthCTA } from './megaMenu.fullWidthCTA';
export { fullWidthImage } from './megaMenu.fullWidthImage';
Loading