Parallax Pills

Bouncy labeled pills that drift along with your cursor

Components
Animations
Backgrounds
Text Effects
Blocks + Templates

Customize

Pill Height
64
Pill Radius
18
Font Size
18
Stagger
0.08
Entry Stiffness
140
Entry Damping
11.0
Entry Distance
220
Hinge Chance
0.50
Hinge Angle
18
Strength
24
Drift Stiffness
60
Drift Damping
18.0

Props

21
pillsParallaxPillItem[]

Foreground pills. Each item has label, background, color, x/y/width as percentages, optional rotate and parallax multiplier

Default5 default pills
backgroundPillsOmit<ParallaxPillItem, 'label' | 'color'>[]

Decorative unlabeled pills behind the foreground for depth

Default6 decorative pills
widthstring | number

Container width

Default"100%"
heightstring | number

Container height

Default480
classNamestring

Additional CSS classes for the outer container

Default""
pillRadiusnumber

Pill border-radius in px (8–48)

Default18
pillHeightnumber

Pill vertical height in px (32–120)

Default64
fontSizenumber

Label font size in px (10–32)

Default18
fontWeightnumber | string

Label font weight

Default500
parallaxStrengthnumber

Maximum cursor parallax displacement in px (mapped to ±strength) (0–80)

Default24
disableParallaxboolean

Disable cursor parallax entirely

Defaultfalse
disableEmptyPillsboolean

Hide the decorative unlabeled background pills

Defaulttrue
disableEntryboolean

Disable the elastic entry animation; pills render in their resting state

Defaultfalse
entryStaggernumber

Stagger between pill entry animations in seconds (0–0.4)

Default0.08
entryStiffnessnumber

Spring stiffness for the entry bounce (40–400)

Default140
entryDampingnumber

Spring damping for the entry bounce; lower values overshoot more (4–30)

Default11
entryDistancenumber

How far above their resting position pills start, as a percent of pill height. Larger values make pills fall from higher up (50–800)

Default220
hingeChancenumber

Probability (0–1) that a pill enters with a hinge tilt. One end hanging lower as if heavier, then springing back

Default0.5
hingeAnglenumber

Magnitude of the initial hinge tilt in degrees; the heavy end starts this far past resting (0–45)

Default18
parallaxStiffnessnumber

Spring stiffness for the parallax drift (10–200)

Default60
parallaxDampingnumber

Spring damping for the parallax drift (4–40)

Default18