FlyoutNav
One panel that follows you. Move between items and it glides sideways and resizes to the new content while the content cross-fades. Navigation.
Open playgroundAbout
FlyoutNav is a React component in the Navigation category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { FlyoutNav } from "@ashutoshswamy/smoui" and set items.
Install
npm i @ashutoshswamy/smouiUsage
import { FlyoutNav } from "@ashutoshswamy/smoui";
<FlyoutNav
items={[
{ id: "product", label: "Product", panel: <ProductMenu /> },
{ id: "docs", label: "Docs", panel: <DocsMenu /> },
{ id: "pricing", label: "Pricing", href: "/pricing" },
]}
/>Props 1
- items
Items with a panel open it on hover, focus or click. Items without one are plain links.
{ id: string; label: string; panel?: ReactNode; href?: string }[]
More navigation components
- BreadcrumbsA trail that folds its middle into an ellipsis. Press it and the hidden crumbs spring out in order.
- DockIcons swell around the cursor and settle back on a spring.
- GooMenuA plus that throws its items out as liquid bubbles and fuses them back on close.
- MorphTooltipOne tooltip for the whole toolbar. It stretches to the next tool and resizes to its label.
- PaginationOne accent pill slides to the page you pick. Long lists fold into ellipses that follow the current page.
- PillNavPill whose highlight stretches toward the item you pick.