MegaMenu
A large dropdown menu that shows multiple levels of navigation.
Preview
Usage
"use client";
import { Box, Button, Flex, MegaMenu, Text } from '@photonix/ultimate';
export default function MegaMenuBasicExample() {
return (
<Box h={160} position="relative">
<Button variant="secondary">Products</Button>
<MegaMenu open={false} onClose={() => undefined} topOffset="0px">
<Flex gap="lg">
<Box>
<Text variant="title-md">Components</Text>
<Text variant="body-sm" color="secondary">Browse the Photonix UI kit.</Text>
</Box>
<Box>
<Text variant="title-md">Templates</Text>
<Text variant="body-sm" color="secondary">Start from ready-made screens.</Text>
</Box>
</Flex>
</MegaMenu>
</Box>
);
}Component API
MegaMenu
Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | Whether the menu is open |
onClose | () => void | - | Callback when menu requests to close (e.g. clicking overlay) |
children | React.ReactNode | - | Content of the menu |
topOffset | string | '72px' | Top offset matching navigation height. Default: 72px |
logoSpacer | React.ReactNode | - | Optional Logo component used for alignment spacing |
On this page
Preview
Component API