52 Pro components and page blocks

Get Pro

Ferrofluid Menu

New

Preview

Customize

Size56px
Spikes13
Spike length22px
Reach220px
Viscosity22px
Neck5.0px
Strands5
Stagger0.06s
Item width188px
Color

Usage

import { FerrofluidMenu } from "@/components/uibrik/ferrofluid-menu/ferrofluid-menu";

<FerrofluidMenu />

Installation

npx shadcn@latest add https://uibrik.com/r/ferrofluid-menu.json
Adds the files to components/uibrik/ferrofluid-menu. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/ferrofluid-menu.

Props

FerrofluidMenu
items
Type string[]
["Profile","Projects","Settings","Sign out"]
Menu items, top to bottom. Up to 8.
size
Type number
56
Diameter of the drop.
spikes
Type number
13
Spikes round the full drop. Only the side facing the pointer raises them.
spikeLength
Type number
22
Length of the tallest spike.
reach
Type number
220
How far from the drop's edge the pointer is felt.
viscosity
Type number
22
How far apart two shapes stay joined. Higher stretches longer necks before they snap.
neck
Type number
5
Radius of the necks joining the open items where they meet each edge; they pinch to under half that in the middle. 0 leaves the items apart.
strands
Type number
5
Glue strings scattered between two items, besides the neck. Each pair gets its own arrangement.
stagger
Type number
0.06
Time between droplets leaving the drop.
itemWidth
Type number
188
Width of the items.
color
Type string
"#0b0b0c"
Colour of the fluid. Labels stay white, so keep it dark.
label
Type string
"Menu"
Accessible name for the trigger and the menu.
defaultOpen
Type boolean
false
Start open.
onSelect
Type (item: string, index: number) => void
–
Called when an item is chosen. The menu closes after.
className
Type string
–
Classes for the wrapper, which is the size of the drop. The menu and spikes overhang it.