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 Portrait

A photo for your about page as a dither print that comes up the way paper does in the darkroom tray: shadows first, then the midtones, the highlights last. A loupe follows the cursor and shows the real photo through it, or drag a divider across to compare the two.

Needs: None. A 2D canvas. The photo must be same-origin or CORS-enabled so its pixels can be read.

Demo photo by Jennifer Trovato on Unsplash

Customize

shape
mode

Props

PropTypeDefaultDescription
srcstringrequiredThe photo. Same-origin or CORS-enabled.
altstringrequiredWhat's in it, for screen readers.
cellnumber3Size of one dither pixel in px.
shape"square" | "dot""square"Square pixels, or round dots like a halftone.
colorbooleanfalseEach dot takes the photo's own colour there, rather than the ink.
mode"lens" | "split""lens"A loupe that follows the cursor, or a divider you drag across.
developingbooleantrueThe print develops when it first comes into view, shadows first.
durationnumber2.6Seconds the print takes to come up.
lensnumber150The loupe's diameter in px.
zoomnumber1.6How much the loupe magnifies.
interactivebooleantrueThe loupe or the divider. Off shows just the print.
classNamestring–Class on the root, which fills its parent.
styleCSSProperties–Style on the root.
← Dither GlobeDither Skeleton →