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 / Data viz

Dot Waffle

Each part lights its share of a hundred dots in its own colour, in reading order, and with a total (a quota, a budget) the unused rest stays dark. The units always add up to exactly a hundred, and a sliver still gets a dot. The dots light in order when it comes into view, and a change flips the dots that change in a wave across the panel, like a flip-dot board. Point at a part, in the panel or the key, and the rest dims; the key gives every part's name, share and value in text.

Needs: None. Canvas 2D.

Customize

Props

PropTypeDefaultDescription
data{ label: string; value: number }[]requiredThe parts of the whole, in the order their colours should go.
totalnumber–The whole, when it's more than the parts add up to; the rest stays dark.
format(value: number) => string–How a value reads in the key.
maxnumber5Most parts in colour; the smallest past this fold into “Other”. At most 5.
tonesstring[]–A colour for each part, in order. The library's series colours by default.
unitnumber16Size of one unit (one percent) in px.
labelstring"Parts of the whole"What the whole is, for screen readers.
classNamestring–Class on the chart.
styleCSSProperties–Style on the chart.
← Dot Chart