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

Dither Upload

A stippled border round a calm field with an upload mark, thickening into the accent when files are dragged over it. Drop files or browse for them (it's a real file input, so the keyboard works); each gets a row whose thumbnail prints as it uploads: an image develops in ink, shadows first, then shows its own colours once it's done, and any other file is a page that fills with ink, its type set on it. A thin dithered line shows progress. Files the accept list or size limit turns away stay on the list, marked, so it's clear why. You send the bytes: pass upload and report progress as it goes.

Needs: None. Canvas 2D. You bring the upload (fetch, XHR, a presigned URL).

Customize

Props

PropTypeDefaultDescription
upload(file: File, report: (progress: number) => void) => Promise<void>–Sends a file, reporting progress 0 to 1. Leave unset to just collect files.
onFiles(files: File[]) => void–Called with the files let in, each time some are added.
onRemove(file: File) => void–Called when a file is taken off the list.
acceptstring"\"\""What's let in, as a file input's accept: “image/*,.pdf”.
multiplebooleantrueTake several files, or one.
maxSizenumber–The largest file let in, in bytes.
hintstring–The line under the call to action.
defaultFilesFile[]–Files already on the list when it first shows.
tonestring–The zone's ink with files over it, and the progress. The page's accent by default.
cellnumber3Size of one dither cell in px.
classNamestring–Class on the uploader.
styleCSSProperties–Style on the uploader.
← Dither TrailDot Accordion →