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

Dot Code

A plain code field, typed, pasted or filled by the phone's one-time-code autofill, drawn as small dot panels. Each digit scans in from the top as a dot display refreshes; a right code sweeps the dots green, a wrong one flashes red and scatters out to try again.

Needs: None. Canvas 2D; the tick uses Web Audio and only plays after a click.

Customize

Props

PropTypeDefaultDescription
lengthnumber6How many digits.
onChange(code: string) => void–Called with the code as it changes.
onComplete(code: string) => void–Called once every digit is in.
verify(code: string) => boolean | Promise<boolean>–Checks a full code: true sweeps it green, false flashes it red and wipes it.
tonestring–The colour of a lit dot. The text colour when unset.
pitchnumber5Size of one dot in CSS px. A box is 7 dots wide, 11 tall.
glowbooleantrueA soft bloom round lit dots.
soundbooleanfalseA soft tick as each digit lights.
autoFocusbooleanfalseFocus the field on mount.
disabledbooleanfalseLocked out.
labelstring"Code"Read out by screen readers.
classNamestring–Class on the field.
styleCSSProperties–Style on the field.
← Dot CheckboxDot Command →