Sections
Get Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Fancy Button
- Field
- Filter
- Form
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Mega Menu
- Menubar
- Native Select
- Navigation Menu
- Number Field
- Pagination
- Pin Input
- Popover
- Progress
- Radio Group
- Radio Stack
- Range Calendar
- Range Slider
- Rating
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stepper
- Swatch
- Swatch Group
- Switch
- Table
- Tabs
- Tags Input
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Forms
Installation
pnpm dlx @frontic/ui add mega-menu
Usage
<script setup lang="ts">
import {
MegaMenu,
MegaMenuContent,
MegaMenuItem,
MegaMenuLink,
MegaMenuList,
MegaMenuTrigger,
} from '@/components/ui/mega-menu'
</script>
<template>
<MegaMenu>
<MegaMenuList>
<MegaMenuItem>
<MegaMenuTrigger>
Category
</MegaMenuTrigger>
<MegaMenuContent>
<!-- Full-width mega-menu panel content -->
</MegaMenuContent>
</MegaMenuItem>
</MegaMenuList>
</MegaMenu>
</template>About
The Mega Menu component provides full-width dropdown panels for navigation, built on reka-ui NavigationMenu primitives.
Unlike the standard NavigationMenu (which renders compact, viewport-measured dropdowns), the Mega Menu uses position: fixed to span the full viewport width — ideal for store navigation headers with featured images, link sections, and promotional content.
Key differences from NavigationMenu
- Full-width panels: Content spans the entire viewport width using fixed positioning
- Auto top positioning: Automatically calculates the top offset from the root element's bottom edge
- No viewport: Does not use
NavigationMenuViewport— content is positioned directly - Headless trigger: No built-in chevron or indicator — the consumer decides the trigger style
Components
| Component | Description |
|---|---|
MegaMenu | Root wrapper. Provides positioning context via inject. |
MegaMenuList | Container for menu items. |
MegaMenuItem | Individual menu item wrapper. |
MegaMenuTrigger | Trigger button. Slot-only — add your own chevron or indicator. |
MegaMenuContent | Full-width fixed panel with fade + zoom animations. |
MegaMenuLink | Link wrapper with proper navigation semantics. |
Composable
The useMegaMenu composable is available for advanced use cases:
import { useMegaMenu } from '@/components/ui/mega-menu'
const { megaMenuTop, updateTop } = useMegaMenu()megaMenuTop— Reactive ref with the calculated top positionupdateTop()— Recalculate the top position (useful for sticky headers)