89 Pro components and page blocks

Get Pro

Blob Selector

New

Preview

Customize

Medium
Stretch0.60
Thin0.50
Color
Active text

Installation

npx shadcn@latest add https://uibrik.com/r/blob-selector.json
Adds the files to components/uibrik/blob-selector and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/blob-selector.

Usage

import { BlobSelector } from "@/components/uibrik/blob-selector/blob-selector";​<BlobSelector  options={["Day", "Week", "Month", "Year"]}  size="md"  stretch={0.6}  thin={0.5}  draggable  equalWidth={false}  color=""  activeColor=""  defaultValue="Week"  label="Range"  // value="…"  // onChange={(value) => {}}/>

Props

BlobSelector
size
Type "sm" | "md" | "lg"
"md"
Height and text size.
stretch
Type number
0.6
How far the trailing edge lags behind; 0 slides a rigid pill.
thin
Type number
0.5
How much the pill thins while it's stretched.
draggable
Type boolean
true
Press and drag across the segments to scrub; the choice is made on release.
equalWidth
Type boolean
false
Give every segment the width of the widest one.
color
Type string
""
Pill colour; empty uses the foreground colour.
activeColor
Type string
""
Text colour on the pill; empty uses the background colour.
optionsrequired
Type (string | { value; label; icon?; disabled? })[]
–
Segments in order.
value / onChange
Type string / (value) => void
–
Controlled selection.
defaultValue
Type string
–
Selection on mount when uncontrolled. Defaults to the first option.
label
Type string
–
Names the group for screen readers.
className
Type string
–
Classes for the bar.