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

Answer Versions

The versions of an answer you get by regenerating, with a pager drawn in dots: an arrow each side, a dot for each version, the one shown a lit pill, and the newest breathing while it's still being written. Switching versions resolves the new text in through a blue-noise dissolve, and the words that differ from the version you came from get a dotted underline that fades after a few seconds, so you can see what the regeneration actually changed.

Needs: None. Canvas 2D and a CSS mask.

Customize

Props

PropTypeDefaultDescription
versionsstring[]requiredEach version of the answer, oldest first. The last may still be streaming.
indexnumber–The version shown, when you hold it. The newest by default.
onIndexChange(index: number) => void–Called when another version is chosen.
onRegenerate() => void–Called by the Regenerate button; leave unset to hide it.
generatingbooleanfalseThe newest version is still being written.
showChangesbooleantrueMark the words that changed from the version you came from.
tonestring–The lit dot and the change marks. The page's accent by default.
pitchnumber3Size of one dot in px.
classNamestring–Class on the answer.
styleCSSProperties–Style on the answer.
← Agent StepsCitation Chip →