HomeLabHire Me
ml-ui111 components

Get started

IntroductionInstallation

UI

Dots

Dot AccordionDot CalendarDot CheckboxDot CodeDot CommandDot ContentsDot CountdownDot CrossingDot FuseDot GaugeDot InstallDot KnobDot LogosDot MenuDot PaginationDot PasswordDot Price RangeDot PricingDot ProgressDot QueueDot RatingDot Reading ProgressDot SelectDot SignupDot SliderDot StatusDot StepperDot SwitchDot TabsDot ToastDot TooltipFlip-Dot CounterLED Marquee

Dither

Dither AvatarDither BannerDither CompareDither GlobeDither PortraitDither SkeletonDither TrailDither UploadDot CookiesDot DialogDot KeysDot ReceiptDot VariantsLenticular Card

More

Pollen TrailSplit-FlapTheme Toggle

Text

Dither RotatorDot TypeEnigma TextInk Print

Data viz

Dots

Contribution FieldDot BarsDot ChartDot Waffle

Dither

Dither DensityDither MapDither Stack

Media

Dots

Dot EqualizerDot WaveformVoice Note

Dither

Dither Scrubber

AI

Agent StepsAnswer VersionsCitation ChipConfidence GlassContext MeterDiffusion ImageDiffusion TextDither MaskDoc ReaderDot DictationGenerate ButtonGhost TextModel PickerPrompt BarResponse ActionsRevising TextSpoken ReplyThinking OrbThinking TraceToken MeterToken StreamWord Alternatives

Useful

Arrival TimeBest ShotCareer LineForgiving SearchGesture PadHeard AsHonest PinImage PaletteLikeness GridNear Miss SearchRain DropsSoft CorrectSpending SortSticker LiftTaste Ledger

Backgrounds

ButterfliesDandelionsDuck PondFirefliesKoi PondLight WellMarigoldsTrain WindowWhite Blossom

ml-ui / UI

Theme Toggle

A light and dark switch drawn as a dot-matrix sun and moon. Press it and the new theme sweeps across the page as a dither or a band of type.

Needs: None. Sets data-theme on <html>; your CSS reads it (ml-ui's styles do, falling back to prefers-color-scheme).

Customize

effect

Props

PropTypeDefaultDescription
effect"dither" | "ascii""dither"How the new theme sweeps across the page: a dithered front, or a band of type.
cellnumber6Cell size of the sweep in px.
durationnumber0.9Seconds for the whole sweep, across and away.
glyphsstring" .:-=+*#%@"Characters across the band of type, faint to dense (ascii).
storageKeystring"theme"Where the choice is remembered in localStorage. Empty to not remember it.
onChange(theme: "light" | "dark") => void–Called with the new theme once the page has switched.
classNamestring–Class on the button.
styleCSSProperties–Style on the button.
← Split-Flap