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

Dot Receipt

When it scrolls into view the receipt feeds up out of the slot a line at a time, with the stutter of a stepper motor: product photos printed in thermal dots, the total last, then a barcode from the order number. The words are real text from the start, sums are done in cents, and with onTear you can drag the paper up until it tears off.

Needs: None. DOM and three small canvases.

Started from a receipt printer pin

Customize

Props

PropTypeDefaultDescription
items{ name: string; price: number; qty?: number; note?: string; image?: string }[]requiredWhat was bought. A photo prints small, in the printer's dots.
lines{ label: string; amount: number }[]"[]"Shipping, tax, a discount below zero: added into the total.
storestring–The shop's name, large at the top.
orderstring–The order number, printed and turned into the barcode. A new one prints a new receipt.
datestring–When, written as you want it shown.
currencystring"USD"ISO currency code for the money.
localestring"en-US"How money is written. Fixed, so server and browser agree.
totalLabelstring"Total"The total's label.
footerstring–A line at the foot.
widthnumber300The paper's width in px.
autoPrintbooleantruePrint when it first scrolls into view.
onTear() => void–Makes it tearable; called when it tears off, then a copy prints.
tearLabelstring"Save a copy"The tear button's words.
tonestring"#ec6a2c"The printer's colour.
classNamestring–Class on the root.
styleCSSProperties–Style on the root.
← Dot Reading ProgressDot Select →