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

Prompt Bar

A glass capsule for writing to a model. It grows as you type, takes files as chips, and lights up when you drag one over it.

Needs: None. Your own send and stop calls.

Customize

size

Props

PropTypeDefaultDescription
onSend(text: string, files: File[]) => voidrequiredCalled with the trimmed text and the attached files on Enter or the send button. The bar then clears itself.
valuestring–Controlled text. Leave it out and the bar keeps its own.
defaultValuestring""Starting text when uncontrolled.
onChange(value: string) => void–Called on every edit, and with "" after sending.
onStop() => void–Called when stop is pressed while generating.
generatingbooleanfalseA reply is being written: the send button morphs into stop. Typing the next message still works; Enter waits.
progressnumber–0 to 1, how far the reply has got. Draws a thin ring around stop. Leave it out when it isn't known; nothing spins.
placeholderstring"Ask anything"Shown in the empty field.
attachmentsbooleantrueAccept pasted, dropped and picked files as chips, with an attach button for the keyboard.
accentstring"#2f6fed"Any CSS colour for the send button, caret, focus ring and drop glow. The arrow turns black or white to suit it. The default lightens in dark mode.
maxRowsnumber8How many lines the text grows to before it scrolls.
size"sm" | "md" | "lg""md"Type size, button size and corner radius.
childrenReactNode–The toolbar slot beside the send button: a ModelPicker, a mode toggle.
classNamestring–Added to the root element.
styleCSSProperties–Inline styles on the root; set --mlui-* variables here to theme it.
← Model PickerResponse Actions →