Skip to content

Commit 8aea526

Browse files
committed
docs(component): update examples for <MegaMenu>
@SutuSebastian recently rewrote how we document our examples on flowbite-react.com, and these changes migrate `<MegaMenu>` to that new workflow.
1 parent bcfbb7f commit 8aea526

File tree

10 files changed

+1674
-0
lines changed

10 files changed

+1674
-0
lines changed

content/docs/components/mega-menu.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: React Mega Menu - Flowbite
3+
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
4+
---
5+
6+
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.
7+
8+
Import the mega menu component from Flowbite React to use it:
9+
10+
```jsx
11+
import { MegaMenu } from 'flowbite-react';
12+
```
13+
14+
## Default mega menu
15+
16+
Use this example to show a list of links aligned on three columns inside the mega menu dropdown.
17+
18+
<Example name="megaMenu.root" />
19+
20+
## Mega menu with icons
21+
22+
This example of a mega menu dropdown can be used to also show an icon near the text of the link.
23+
24+
<Example name="megaMenu.icons" />
25+
26+
## Full width dropdown
27+
28+
Use this example to show a mega menu dropdown that spans the entire width of the document page.
29+
30+
<Example name="megaMenu.fullWidth" />
31+
32+
## Full width with CTA
33+
34+
This example can be used to also show a CTA button or link next to the menu items inside the dropdown.
35+
36+
<Example name="megaMenu.fullWidthCTA" />
37+
38+
## Full width with image
39+
40+
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.
41+
42+
<Example name="megaMenu.fullWidthImage" />
43+
44+
## Theme
45+
46+
**This component is currently in development, and does not yet support a theme.**
47+
48+
## References
49+
50+
- [Flowbite Mega Menu](https://flowbite.com/docs/components/mega-menu/)

data/docs-sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const DOCS_SIDEBAR: DocsSidebarSection[] = [
5454
{ title: 'Forms', href: '/docs/components/forms' },
5555
{ title: 'KBD', href: '/docs/components/kbd', isNew: true },
5656
{ title: 'List group', href: '/docs/components/list-group' },
57+
{ title: 'Mega menu', href: '/docs/components/mega-menu', isNew: true },
5758
{ title: 'Modal', href: '/docs/components/modal' },
5859
{ title: 'Navbar', href: '/docs/components/navbar' },
5960
{ title: 'Pagination', href: '/docs/components/pagination' },

examples/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export * as forms from './forms';
1818
export * as kbd from './kbd';
1919
export * as listGroup from './listGroup';
2020
export * as list from './list';
21+
export * as megaMenu from './megaMenu';
2122
export * as modal from './modal';
2223
export * as navbar from './navbar';
2324
export * as pagination from './pagination';

examples/megaMenu/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export { root } from './megaMenu.root';
2+
export { icons } from './megaMenu.icons';
3+
export { fullWidth } from './megaMenu.fullWidth';
4+
export { fullWidthCTA } from './megaMenu.fullWidthCTA';
5+
export { fullWidthImage } from './megaMenu.fullWidthImage';

0 commit comments

Comments
 (0)