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 / Useful

Soft Correct

A text box that autocorrects as you type and leaves every change in sight. A faint underline marks each fix, and what you typed lingers underneath while the call was close.

Needs: A word list, most common first (the demo uses 12,000 English words, about 134 KB with the pair table). No model: the speller runs in the component.

Customize

Props

PropTypeDefaultDescription
wordsstring[]requiredThe dictionary, most common word first. Probabilities come from the rank.
pairsstring–Next-word table, "prev next P(next|prev)" entries joined by commas, so the word before can tip a close call.
defaultValuestring""Starting text. Typos in it are corrected on mount, quietly.
learned{ word: string; seen: number }[]–Words learned before (kept from onLearnedChange), so it remembers between visits. Read once.
onLearnedChange(learned: { word: string; seen: number }[]) => void–Called whenever a word is learned or forgotten. Save it and pass it back as learned.
onChange(value: string) => void–Called with the text, corrections included, on every change.
placeholderstring"Message"Shown while the box is empty.
labelstring"Message"Accessible name for the text box.
sizenumber18Font size of the text, in px.
accentstring"#2f6fed"Caret, focus ring and selection colour, any CSS colour. Left unset, a lighter blue is used in dark mode. Corrections are never coloured.
classNamestring–Class on the root element.
styleCSSProperties–Style on the root element. Theme it through the --mlui-* variables.
← Rain DropsSpending Sort →