GooMenu
A plus that throws its items out as liquid bubbles and fuses them back on close. Navigation.
Open playgroundAbout
GooMenu 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 { GooMenu } from "@ashutoshswamy/smoui" and set items, radius, goo.
Install
npm i @ashutoshswamy/smouiUsage
import { GooMenu } from "@ashutoshswamy/smoui";
<GooMenu
items={[
{ label: "Camera", icon: <CameraIcon width={22} height={22} />, onSelect: openCamera },
{ label: "Message", icon: <PaperAirplaneIcon width={22} height={22} /> },
]}
/>Props 3
- items
Bubbles, laid out on an upward arc.
{ label: string; icon: ReactNode; onSelect?: () => void }[]- radius
Distance from the button in px. Leave this much room above.
numberdefault104- goo
Fusion strength: higher fuses bubbles from further away.
numberdefault10
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.
- FlyoutNavOne panel that follows you. Move between items and it glides sideways and resizes to the new content while the content cross-fades.
- 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.