UIR

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-menu

Usage

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

PropTypeDefault
links

{ label, onPress? } shown when open.

BlobMenuLink[]—
color

Blob and button colour.

string"#000"
textColor

Link and icon colour.

string"#fff"
openIcon

Content of the open button.

ReactNode☰
closeIcon

Content of the close button.

ReactNode✕
topInset

Extra space above the buttons, e.g. the safe-area top.

number0
openDuration

Open animation length (ms).

number1400
closeDuration

Close animation length (ms).

number1100
closeOnSelect

Close after a link is pressed.

booleantrue