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

Generate Button

The button that starts generation. A ring runs round it while the work goes, the label turns to Stop, and a check lands when it's done.

Needs: None.

Customize

size

Props

PropTypeDefaultDescription
onGenerate(signal: AbortSignal) => Promise<unknown> | void–Starts the work. Return a promise and the button shows it running, then done; the signal aborts when Stop is pressed.
state"idle" | "generating" | "done"–Controlled state. Leave out and the button runs itself from onGenerate's promise. Done settles back to idle on its own after a moment.
onStop() => void–Called when Stop is pressed.
progressnumber–0 to 1 while generating. The ring fills to it; without it the ring sweeps.
labelstring"Generate"The idle label.
stopLabelstring"Stop"The label while generating.
doneLabelstring"Done"The label beside the check.
accentstring""Fill, glow and ring colour. Text on it is white, so pick a colour dark enough to carry it.
size"sm" | "md" | "lg""md"Height: 32, 40 or 48 px.
disabledbooleanfalseDisables the button.
classNamestring–Added to the root.
styleCSSProperties–Inline styles for the root.
← Dot DictationGhost Text →