BlobMenu
Full-screen menu. Blobs sweep in from the button and the edges until the screen is covered, then the links fade up one by one. Closing plays it in reverse.
Preview
Installation
npx @codewithrabby/ui@latest add blob-menuUsage
import { BlobMenu } from "@/components/uir/blob-menu";
const insets = useSafeAreaInsets();
<View style={{ flex: 1 }}>
{/* your screen content */}
<BlobMenu
topInset={insets.top}
links={[
{ label: "Home", onPress: () => router.push("/") },
{ label: "About" },
]}
/>
</View>Props
| Prop | Type | Default |
|---|---|---|
links{ label, onPress? } shown when open. | BlobMenuLink[] | — |
colorBlob and button colour. | string | "#000" |
textColorLink and icon colour. | string | "#fff" |
openIconContent of the open button. | ReactNode | ☰ |
closeIconContent of the close button. | ReactNode | ✕ |
topInsetExtra space above the buttons, e.g. the safe-area top. | number | 0 |
openDurationOpen animation length (ms). | number | 1400 |
closeDurationClose animation length (ms). | number | 1100 |
closeOnSelectClose after a link is pressed. | boolean | true |