Simal UI
Components

Badge

Badge positions itself absolutely against its parent, so every story wraps it in a relatively-sized box — on its own it has nothing to anchor to.

Import

import { Badge } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
children"3"The count. Omit it entirely and the badge collapses to a bare dot.
variantdestructive · info"destructive"destructive (the default) for anything needing attention, info for the primary colour.
maxCountCounts above this render as {maxCount}+, so the pill cannot grow without bound.
textVariantText scale for the count. Defaults to caption2.
containerClassNameClasses for the pill itself. className goes to the count text, not the container.

Examples

Dot

With no children it collapses to a bare dot — an unread marker.

Overflow

Counts above maxCount render as {maxCount}+.

Info

On this page