Documentation
- 312 sections
- Solid
- Tailwind or StyleX
Animated content
Wrap anything to have it slide and fade into place the first time it enters the viewport. Direction, distance and timing are configurable, and distance takes CSS lengths too: distance="4cqw" reveals from 4% of the nearest query container, so the motion measures its parent instead of pixels.
- distance
- Typenumber (px) | CSS length: "4cqw" rides the nearest query container Default40
- direction
- Type"vertical" | "horizontal" Default"vertical"
- reverse
- Typeboolean Defaultfalse
- duration
- Typenumber (ms) Default800
- delay
- Typenumber (ms) Default0
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherAnimatedContentFade content
A pure fade-in on view, optionally de-blurring as it appears. The lighter cousin of Animated content when you only want opacity.
- duration
- Typenumber (ms) Default1000
- delay
- Typenumber (ms) Default0
- blur
- Typeboolean Defaultfalse
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherFadeContentGradual blur
A masked backdrop-filter strip that progressively blurs toward an edge: the iOS-style soft fade over a scroll region.
- position
- Type"bottom" | "top" Default"bottom"
- height
- Typenumber (px) Default96
- strength
- Typenumber (px) Default4
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherGradualBlurStar border
A rounded frame with two bright glints traveling its top and bottom edges: a subtle animated outline for a CTA or badge.
- color
- Typestring (hex) Default"#7CFF67"
- speed
- Typenumber (s) Default6
- thickness
- Typenumber (px) Default1
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherStarBorderElectric border
An SVG turbulence filter jitters the frame edge into a crackling electric outline. Reduced motion drops the displacement.
- color
- Typestring (hex) Default"#5227FF"
- speed
- Typenumber Default1
- thickness
- Typenumber (px) Default2
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherElectricBorderGlare hover
A diagonal sheen sweeps across the surface on hover: the glossy-card reflection, done with a single masked gradient. Hover the card.
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherGlareHoverMagnet
The wrapped element is pulled toward the pointer while it is within range, easing back when the cursor leaves. Move your cursor near the button.
- strength
- Typenumber (0-1) Default0.4
- radius
- Typenumber (px) Default200
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMagnetClick spark
A burst of spark lines radiates from every click inside the area, drawn on a lightweight canvas overlay. Click anywhere in the preview.
- color
- Typestring (hex) Default"#7CFF67"
- count
- Typenumber Default8
- size
- Typenumber (px) Default16
- duration
- Typenumber (ms) Default420
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherClickSparkBlob cursor
A soft, screen-blended blob eases toward the pointer inside the area: a gooey cursor companion. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- size
- Typenumber (px) Default48
- lag
- Typenumber (0-1) Default0.18
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherBlobCursorCrosshair
Full-height and full-width guide lines track the pointer across the area: a precision reticle. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- thickness
- Typenumber (px) Default1
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCrosshairGhost cursor
A tapering trail of fading dots chases the pointer on a canvas overlay. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- count
- Typenumber Default18
- size
- Typenumber (px) Default10
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherGhostCursorSplash cursor
Expanding ripple rings bloom along the pointer path, like drops on water. Move your cursor over the box.
- color
- Typestring (hex) Default"#3DA5FF"
- maxRadius
- Typenumber (px) Default60
- duration
- Typenumber (ms) Default700
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherSplashCursorTarget cursor
A slowly rotating corner-bracket reticle locks onto the pointer: a HUD targeting frame. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- size
- Typenumber (px) Default36
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherTargetCursorPixel trail
The pointer lights up cells of a pixel grid that then fade back out: a glowing wake across the lattice. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- gap
- Typenumber (px) Default24
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPixelTrailImage trail
Tiles from a palette drop along the pointer path, rotating and shrinking as they fade. Pass real image URLs via colors swapped for tiles here. Move your cursor over the box.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CFF67', ...]
- size
- Typenumber (px) Default40
- duration
- Typenumber (ms) Default650
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherImageTrailMeta balls
Orbiting blobs fuse into a gooey metaball iso-surface, tinted and ordered-dithered through the kit engine. The pointer adds a blob.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CFF67', '#3DA5FF']
- count
- Typenumber Default6
- speed
- Typenumber Default1
- ballSize
- Typenumber Default1
- glow
- Typenumber Default1.5
- mouseInteraction
- Typeboolean Defaulttrue
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMetaBallsMetallic paint
Iterative domain-warped reflections read as flowing liquid chrome. Fully opaque, dithered across a metallic ramp.
- colors
- Typestring[] (hex) Default['#1A1A22', '#8890A0', '#E8ECF4']
- scale
- Typenumber Default3
- speed
- Typenumber Default0.4
- distortion
- Typenumber Default0.6
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMetallicPaintNoise
Animated hashed grain thresholded against the Bayer matrix: living static for a texture overlay. Tune density and blend it over content.
- colors
- Typestring[] (hex) Default['#3DA5FF', '#7CE0FF', '#FFFFFF']
- speed
- Typenumber Default1
- density
- Typenumber (0-1) Default0.5
- opacity
- Typenumber (0-1) Default1
- paused
- Typeboolean Defaultfalse
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultnone
- seed
- Typenumber Defaultnone
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherNoiseCubes
A rhombille tiling shades into a field of isometric cubes, each face lit and pulsing on noise. Tinted and ordered-dithered.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CFF67', '#CFFFDF']
- scale
- Typenumber Default6
- speed
- Typenumber Default0.4
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCubesRibbons
Thick flowing bands ride wavy fbm centerlines, bright at the core and tinted per ribbon. The pointer bends nearby ribbons toward it.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CFF67', '#3DA5FF']
- count
- Typenumber Default5
- speed
- Typenumber Default0.5
- thickness
- Typenumber Default0.12
- amplitude
- Typenumber Default1
- glow
- Typenumber Default1.2
- mouseInteraction
- Typeboolean Defaulttrue
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- mouseStrength
- Typenumber Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherRibbonsShape blur
A big soft blob morphs on noise and drifts toward the pointer: a gentle out-of-focus shape. Move your cursor over it.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CFF67']
- size
- Typenumber Default0.4
- speed
- Typenumber Default0.6
- softness
- Typenumber Default0.3
- mouseInteraction
- Typeboolean Defaulttrue
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- mouseStrength
- Typenumber Default0.5
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherShapeBlurStrands
Dozens of thin filaments sway on fbm like blown hair, tinted by depth and ordered-dithered with transparent gaps.
- colors
- Typestring[] (hex) Default['#5227FF', '#7CE0FF']
- count
- Typenumber Default40
- speed
- Typenumber Default0.4
- sway
- Typenumber Default0.15
- lineWidth
- Typenumber Default0.01
- glow
- Typenumber Default1
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherStrandsLaser flow
Sharp horizontal beams sweep with additive bloom and a faint jitter, tinted per beam: a scanning laser array.
- colors
- Typestring[] (hex) Default['#FF3D2E', '#FFD23D', '#FFFFFF']
- count
- Typenumber Default4
- speed
- Typenumber Default0.6
- beamWidth
- Typenumber Default0.02
- glow
- Typenumber Default1
- opacity
- Typenumber (0-1) Default1
- dither
- Typenumber (0-1) | boolean Default1
- paused
- Typeboolean Defaultfalse
- dpr
- Typenumber Defaultnone
- mixBlendMode
- Typestring Defaultundefined
- seed
- Typenumber Defaultundefined
- frameRate
- Typenumber (fps, stop-motion) Default0 (smooth)
- renderMode
- Type"live" | "static" Default"live"
- precompiled
- Typestring | { src: string; width?: number; height?: number } Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherLaserFlowAntigravity
A field of motes drifts upward and wraps: gravity in reverse, layered behind your content.
- color
- Typestring (hex) Default"#7CFF67"
- count
- Typenumber Default40
- speed
- Typenumber Default1
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherAntigravityLogo loop
A seamless infinite marquee of items. Pass logos or wordmarks and it loops forever with a measured wrap.
- items
- Typestring[] Default['DITHER', 'BAYER', ...]
- speed
- Typenumber (s) Default18
- gap
- Typenumber (px) Default48
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherLogoLoopMagic rings
Concentric rings pulse outward from the center on a stagger: a radar-ping halo around whatever you wrap.
- color
- Typestring (hex) Default"#7CFF67"
- count
- Typenumber Default4
- duration
- Typenumber (s) Default3
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMagicRingsMagnet lines
A grid of little needles all swivel to point at the pointer, like iron filings over a magnet. Move your cursor over the box.
- color
- Typestring (hex) Default"#7CFF67"
- gap
- Typenumber (px) Default28
- lineLength
- Typenumber (px) Default14
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherMagnetLinesOrbit images
Items ride a circular orbit around a center point. Pass avatars, logos or labels. Counter-rotated so they stay upright.
- items
- Typestring[] Default['A', 'B', 'C', 'D', 'E']
- radius
- Typenumber (px) Default80
- duration
- Typenumber (s) Default16
- size
- Typenumber (px) Default200
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherOrbitImagesPixel transition
A grid of pixel cells covers the content and dissolves in a scattered order on hover, revealing what is underneath. Hover the card.
- rows
- Typenumber Default6
- cols
- Typenumber Default10
- color
- Typestring (hex) Default"#111318"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPixelTransitionDither reveal
Any content comes in through an ordered-dither mask. A dissolve resolves cell by cell in the Bayer order; a wipe moves a solid front with a dithered band behind it. The mask is a pure function of progress, so a seeked frame (the player, a video export) gets the same cells every time, and the Studio's reels cut between frames with it. Pass progress to drive it from your own timeline.
- progress
- Typenumber 0–1 (manual; unset plays on the clock) Defaultnone
- duration
- Typenumber (s) Default1.2
- delay
- Typenumber (s) Default0
- direction
- Type'none' | 'right' | 'left' | 'down' | 'up' | 'iris' Default'none' (dissolve)
- cell
- Typenumber (px) Default4
- band
- Typenumber (cells; directional wipes) Default12
- seed
- Typenumber (a seeded 4×4 matrix) Defaultnone (Bayer 8×8)
- reverse
- Typeboolean (hide instead) Defaultfalse
- easing
- TypeEasingInput Default'ease-in-out'
- restartKey
- Typeunknown (change to replay) Defaultnone
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
- aria-hidden
- Typeboolean | "true" | "false" Defaultnone
- data-phase
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherRevealPage transition
One state turns into the next through the same masks. ditherTransition runs any DOM change as a view transition and dithers its two snapshots, the old one breaking up as the new one resolves, with an ink riding the front between them. Give it a target to change one element while the page stays live, or none for the whole page: this site moves between its pages and turns its theme that way. Without the View Transitions API, under reduced motion or while the clock is directed, the change just happens.
- update
- Type() => void | Promise<void> (the change) Defaultnone
- direction
- Type'none' | 'right' | 'left' | 'down' | 'up' | 'iris' Default'none' (dissolve)
- origin
- Type{ x, y } (viewport px; the iris's centre) Defaultthe box's centre
- cell
- Typenumber (px) Default6
- band
- Typenumber (cells) Default10
- seed
- Typenumber (a seeded 4×4 matrix) Defaultnone (Bayer 8×8)
- ink
- Typestring (a CSS colour between the two) Defaultnone
- duration
- Typenumber (ms) Default600
- easing
- TypeEasingInput Default'ease-in-out'
- target
- TypeHTMLElement (the element that changes) Defaultthe whole page
Sticker peel
A corner of the card peels up on hover with a soft curl shadow: the sticker lift. Hover the card.
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherStickerPeelExpand tabs
An icon bar where only the active tab unfolds its label. The rest stay square glyphs. The label slides through the house 0fr grid trick.
- tabs
- Type{ value, label, color? }[] Defaultrequired
- modelValue
- Typestring (with onUpdateModelValue) Defaultrequired
- color
- TypePixelColor: active glyph fallback Default"blue"
- class
- Typestring Defaultnone
- onUpdateModelValue
- Type(value: string) => void Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherExpandTabsIsland
A morphing status pill: the compact row keeps its pulse while the detail unfolds beneath. Escape collapses; reduced motion snaps.
- modelValue
- Typeboolean (with onUpdateModelValue): expanded Defaultfalse
- label
- Typestring: compact row text Default"Status"
- color
- TypePixelColor: status dot Default"green"
- live
- Typeboolean: pulse the dot while collapsed Defaulttrue
- class
- Typestring Defaultnone
- onUpdateModelValue
- Type(value: boolean) => void Defaultnone
- compact / children
- TypeJSX.Element (children: the detail panel) Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherIslandCard stack
A swipe deck on the kit's own gesture math: 1:1 tracking, rubber-band past the edge, a flick or a far drag sends the card flying and the stack rises. Drag the top card.
- items
- TypeT[]: cycled forever Defaultrequired
- depth
- Typenumber: visible under-cards Default2
- class
- Typestring Defaultnone
- children
- Type({ item, index, top }) => JSX.Element Defaultcard face fallback
- onAdvance
- Type(index) after a card flies out Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherCardStackDock
A hover-magnifying dock: items swell on a gaussian falloff around the pointer and settle when it leaves. Reduced motion keeps the row still.
- items
- Type{ value, label, color? }[] Defaultrequired
- magnify
- Typenumber: peak scale over the pointer Default1.7
- range
- Typenumber (px): gaussian falloff radius Default80
- class
- Typestring Defaultnone
- onSelect
- Type(value) Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherDockPreview rail
A Codex app-inspired navigation rail: compact ticks form a pyramid around the pointer and reveal a floating destination preview beside the rail. Keyboard focus previews too; reduced motion keeps the ticks still.
- items
- Type{ value, label, hint?, color? }[] Defaultrequired
- modelValue
- Typestring (with onUpdateModelValue): active destination Defaultundefined
- range
- Typenumber (px): pyramid falloff radius Default56
- side
- Type"left" | "right": edge the rail hugs Default"left"
- class
- Typestring Defaultnone
- onUpdateModelValue
- Type(value: string) => void Defaultnone
- preview
- Type({ item }) => JSX.Element (custom preview content) Defaultlabel + hint
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherPreviewRailScroll progress
Reading progress as a dithered bar. It composes DitherProgress and rides the viewport edge, or the top of any scrollable parent. Scroll the box.
- attach
- Type"viewport" | "parent" Default"viewport"
- edge
- Type"top" | "bottom" Default"top"
- color
- TypePixelColor Default"green"
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherScrollProgressBouncy accordion
A single-open accordion with a weighted spring layout: panels overshoot and settle on a sampled damped-spring easing, icon rows lead each header, and content rises into view. Reduced motion reveals instantly.
- items
- Type{ value, label, hint?, icon?, color?, content? }[] Defaultrequired
- modelValue
- Typestring (with onUpdateModelValue): open item, "" closes all Default""
- color
- TypePixelColor: icon fallback tint Default"blue"
- class
- Typestring Defaultnone
- onUpdateModelValue
- Type(value: string) => void Defaultnone
- slots
- TypeRecord<value, JSX.Element>: rich panel content (else item.content) Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherBouncyAccordionExpanding arrow
An accent tile that expands into a dotted-arrow trail on hover or focus. The trail is stamped from the same accent hue. Reduced motion reveals it instantly.
- color
- TypePixelColor: tile and trail accent Default"blue"
- disabled
- Typeboolean Defaultfalse
- class
- Typestring Defaultnone
- children
- Typelabel content Default"Explore the kit"
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherExpandingArrowSlide action
Drag the thumb to the end of the track to confirm (flick momentum counts), or release early and it springs back. Enter or Space confirms without the slide.
- label
- Typestring: track text and thumb aria-label Default"Slide to confirm"
- color
- TypePixelColor: thumb accent Default"green"
- disabled
- Typeboolean Defaultfalse
- class
- Typestring Defaultnone
- onConfirm
- Type() when the thumb reaches the end, or Enter/Space Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherSlideActionHold action
Hold to complete: a liquid fill with a dotted crest rises (or slides) while you press; release early and it drains back. A held Enter or Space works the same way.
- duration
- Typenumber (ms): hold time to complete Default1200
- direction
- Type"vertical" | "horizontal": fill axis Default"vertical"
- color
- TypePixelColor: fill and crest accent Default"orange"
- disabled
- Typeboolean Defaultfalse
- class
- Typestring Defaultnone
- onComplete
- Type() when the fill reaches full, once per hold Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherHoldActionWallet card
A wallet overview card: the account switcher and search morph open from their triggers (recents listed in the panel), the balance cascades in with a change pill and privacy toggle, the address copies with feedback, the bell carries an unread pulse, and Send / Deposit / Swap / Buy report through one event.
- accounts
- Type{ value, label, address, balance, change?, color? }[] Defaultrequired
- modelValue
- Typestring (with onUpdateModelValue): selected account Defaultfirst account
- balance / change
- Typenumber: override the active account's numbers Defaultaccount data
- currency
- Typestring: balance prefix Default"$"
- defaultHidden
- Typeboolean: start masked Defaultfalse
- searchPlaceholder
- Typestring Default"Search…"
- recent
- Typestring[]: recent queries in the search panel Defaultundefined
- notifications
- Typeboolean: unread pulse on the bell Defaultfalse
- color
- TypePixelColor: card accent Default"green"
- class
- Typestring Defaultnone
- onUpdateModelValue
- Type(value: string) => void Defaultnone
- onAction
- Type("send" | "deposit" | "swap" | "buy") Defaultnone
- onSearch
- Type(query), live text on every keystroke Defaultnone
- onSubmit
- Type(query) on Enter or a recent row Defaultnone
- onNotify
- Type() when the bell is pressed Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherWalletCardNotification stack
Compact notification cards that spring from a stacked summary into a readable list on hover, focus or tap. Tap pins the list open, and the view-all row appears with the expansion. Reduced motion snaps.
Variants
- items
- Type{ id, title, body?, time?, icon?, color? }[] Defaultrequired
- modelValue
- Typeboolean (with onUpdateModelValue): pinned open; hover/focus expand transiently Defaultfalse
- onUpdateModelValue
- Type(expanded: boolean) => void Defaultnone
- maxVisible
- Typenumber: cards shown in the stack and list Default3
- collapsedLabel
- Typestring: header + toggle aria-label Default"Notifications"
- expandedLabel
- Typestring: view-all button text Default"View all"
- emptyLabel
- Typestring: empty-state card Default"All caught up"
- variant
- Type"stack" | "fan" | "condensed": collapsed silhouette Default"stack"
- color
- TypePixelColor: icon fallback tint Default"blue"
- onViewall
- Type() when view-all is pressed Defaultnone
- class
- Typestring Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherNotificationStackStep timing
Quantized time for a quantized renderer: steps() samples progress instead of interpolating it, the temporal twin of the Bayer threshold. One keyframe run, three clocks: smooth, six-step (both endpoints visible), three-step (the end value lands only on the last frame).
The kit's shared field runtime takes the same idea down at the driver layer: frameRate paints only on wall-time boundaries and holds the raster between them: stop-motion and fewer buffer uploads. Two Auroras, same clock source, different cadence.
- steps(n, position?)
- Type(p) => number, css-easing-1 step positions Default"jump-end"
- frameSteps(fps, durationMs)
- Type(p) => number, frame(fps) cadence polyfill Defaultnone
- frameIndex(elapsedMs, fps)
- Typenumber: wall-clock frame gate for drivers Defaultnone
- cssSteps(n, position?)
- Typestring: one config serialized for CSS Default"jump-end"
- DitherAurora frameRate
- Typenumber (fps) Default0 (smooth)
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherAuroraSequences
Many animations, one clock. The timeline algebra flattens serial chains, parallel groups, staggered waves and loops into a single plan; the driver samples it and writes --seq-p + data-seq onto each child. Children style themselves, the engine only owns time. Ease with steps() and the whole wave quantizes.
Each cell reads only its own --seq-p: rise on the forward leg, sink on the yoyo leg, three cycles, settled at 1. Change the origin and the delay wave recomputes; quantize and steps(4) buckets the entire group into four positions. Reduced motion gets the settled state with zero frames.
- stagger
- Typenumber: seconds between neighbouring children Default0.06
- from
- Type"start" | "center" | "end" | "edges" | literal index Default"start"
- duration / easing
- Typenumber (s per cycle) / CSS timing function | linear / steps(n) from timing.ts Default0.5 / linear
- loop / yoyo / delay
- Typenumber / boolean / seconds before the timeline Default1 / false / 0
- paused / restartOnView / frameRate
- Typeboolean / boolean / fps cadence (steps a cycle, in place of easing) Defaultfalse / false / 0
- restartKey / onComplete
- Typestring | number (bump rebuilds and replays) / () => void Defaultnone
- as
- Typestring Default"div"
- class
- Typestring Defaultnone
- children
- Typecontent Defaultnone
- planSequence(node | node[])
- TypeSequencePlan: flatten serial | parallel | stagger | track once Defaultnone
- sampleSequence(plan, t)
- TypeTrackSample[]: { id, index, progress, raw, cycle, state } Defaultnone
- staggerDelay(i, count, each, from)
- Typenumber: the delay wave, testable alone Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherSequenceContainer queries
A card in a sidebar and the same card in a wide main column are not the same card, so stop asking the viewport. DitherContainer makes its own box the query target: it measures the content box (exactly what @container sees), resolves a bucket scale onto data-cq + --cq-w / --cq-i, and exposes the same state through its function child. Children restyle themselves in CSS while animations re-parameterize in JS.
The grid re-columns purely from [data-cq] (CSS reading the container's own state), while the Sequence's stagger, origin and replay derive from the same bucket through the child. Narrow it to xs and the wave tightens to 0.03s/cell; widen to xl and it fans from the center at 0.11s. quantize() rounds widths to the step so readouts and canvas painters hold like frames: the spatial half of the timing engine's step idea. This demo overrides scale so all five buckets fit the docs column; the default CONTAINER_SCALE targets wider shells. The blue bar runs the shipped dither-cq-traverse keyframe: translateX(±100cqw) makes its journey exactly one container width, so a resize re-scales the animation live, where translateX(50%) would measure the bar itself and vw would measure the viewport.
- scale
- TypeCqScale: Record<name, min | { min?, max? }>; min inclusive, max exclusive, order irrelevant DefaultCONTAINER_SCALE (xs 0, sm 240, md 360, lg 520, xl 720)
- step
- Typenumber: quantize --cq-w to this px (0 = continuous) Default0
- name
- Typestring: native container-name for children's @container rules Default"dither"
- as / class
- Typeelement tag / passthrough class Default"div" / none
- children
- Typefunction of { width, height, size, index, matches }: measured content box (what @container sees), active bucket, its ordinal, every matching bucket Defaultnone
- resolveCq(width, scale?)
- TypeCqState: the pure resolver (active = highest matching min) DefaultCONTAINER_SCALE
- quantize(value, step)
- Typenumber: nearest step, never negative; step ≤ 0 is identity Defaultnone
- data-cq / --cq-w / --cq-h / --cq-i
- Typeactive bucket attribute + content-box width/height (raw or quantized together) + ordinal, published on the host for CSS Defaultnone
- dither-cq-traverse / dither-cq-rise
- Typeshipped @keyframes: translateX(±100cqw) / translateY(±100cqh); motion measured against the container (small-viewport fallback when none) Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherContainer DitherSequenceStage
Layers in container units. A DitherStage is a size query container with one clock (the kit's, so it seeks for video), and each DitherLayer runs keyframes whose lengths keep their units through interpolation: 10cqw to 30cqw is 20cqw halfway, mixed units become a calc(). Canvas, SVG and DOM layers move exactly relative to the stage at any size, and the same sample resolves to px through the child for anything that paints. Shrink the stage: every path shrinks with it.
The aurora is a canvas surface riding a layer: it drifts twelve percent of the stage, never twelve percent of the viewport. The two hills are SVGs on their own layers at two speeds: parallax in container units. The moon places its keys with at (seconds or a percentage) and eases one segment. The last layer keeps custom keys, cx and cy, which the child is handed resolved to px against the measured box: exactly the numbers a canvas painter needs. Nothing here is a CSS animation: the stage's clock samples every track, so a frame exported to video lands on the same moment.
- duration
- Typenumber (s): the stage clock loops over it; unset, time runs on Defaultnone
- speed
- Typenumber: clock multiplier Default1
- paused / frameRate
- Typeboolean / number (fps, 0 = smooth) Defaultfalse / 0
- restartKey
- Typeunknown: change to restart from 0 Defaultnone
- as / class
- Typeelement tag / passthrough class. Give the stage a height: it is a size query container Default"div" / none
- children
- Typefunction of { time, width, height }: the moment and the measured content box Defaultnone
- data-stage / --cq-w / --cq-h
- Typeplaying | directed | paused | still, and the box for CSS Defaultnone
- keyframes
- TypeKeyframe[]: { at? (s or '50%'), easing?, x, y (lengths: px, %, cqw, cqh, cqi, cqb, cqmin, cqmax, vw…, calc()), rotate, skewX, skewY (angles), scale, scaleX, scaleY, opacity, ...custom numbers or lengths } Default[]
- duration
- Typenumber (s): unset, the last key's at in seconds, else 1 Defaultnone
- delay / loop / yoyo
- Typenumber (s) / number | true / boolean Default0 / 1 / false
- easing
- Type'linear' | 'ease-out' | 'ease-in-out' | bezier points | seed | Easing: between keys; a key's own easing wins for the segment it starts Defaultlinear
- origin
- Typestring: transform-origin, container units welcome Default"50% 50%"
- as / class
- Typeelement tag / class (the layer is absolute, inset 0) Default"div" / none
- children
- Typefunction of every property resolved to px / degrees against the stage box, plus progress, cycle, time, width, height (the state is data-layer) Defaultnone
- style / data-layer
- Typetransform in the keyframes' own units, opacity, --layer-p and --layer-<name> per property; before | active | done Defaultnone
- sampleKeyframes(track, t), keyframeTransform(sample, box?), resolveSample(sample, box), parseLength / termsToCss / termsToPx
- Typethe engine alone, for your own painters and timelines Defaultnone
curl -fsSL https://dither-ui.com/add/dither-add.mjs | node --input-type=module - add DitherAurora DitherLayer DitherStage