Tessina UI
Tessina UI
GitHubIntroduction
InstallationUsageTheming
Components
ButtonIconButtonLinkSpinnerBadgeAvatarStatusChipShortcutSkeletonSurfaceProgressMeterRating
LabelFieldFieldsetCheckboxRadioSwitchSliderSelectComboboxSearchTextareaNumberFieldDate PickerTime PickerOTP InputFile UploadCalendar
AlertBannerToastTooltip
TabsAccordionCollapsibleBreadcrumbPaginationStepperSegmentedControlButtonGroupToggleButtonToggleGroupToolbarNavigation MenuMenubarBottom NavSidebar
Split ButtonFABDropdown MenuContextMenuCommandPopoverHoverCard
ContainerStackFlexGridAspectRatioSpacerCardCarouselDividerScroll Area
Table
ChatBubblePromptInputCodeBlock
ModalAlertDialogDrawerAction SheetTop Header MobileTop Header DesktopEmptyStateForm
Contributing
ComponentsEssentials

Badge

A small notification indicator that overlays other components. Two variants — Dot (plain circle) and Label (pill with text). Two appearances — Solid and Outline. Four sizes. Six colors. Five corner-rounding options.

Playground

Installation

pnpm add @tessinaui/ui

Usage

import { Badge } from "@tessinaui/ui";
{/* Dot */}
<Badge variant="dot" color="error" />

{/* Label with count */}
<Badge variant="label" size="sm" value="+99" />

{/* Label with text — grows horizontally to fit */}
<Badge variant="label" size="md" color="success" value="Accepted" />

{/* Outline appearance */}
<Badge variant="label" size="md" color="primary" appearance="outline" value="Pro" />

Showcase

All sizes, variants, appearances, and colors:

API Reference

Props

PropTypeDefaultDescription
variant"dot" | "label""dot"dot — plain circle; label — pill that grows horizontally with text
appearance"solid" | "outline""solid"solid — filled background; outline — transparent bg, colored border + text
size"xs" | "sm" | "md" | "lg""sm"Diameter / height: 8 / 16 / 20 / 24 px
color"error" | "warning" | "success" | "info" | "primary" | "secondary""error"Color token used for background (solid) or border + text (outline)
rounded"full" | "lg" | "md" | "sm" | "none""full"Corner rounding for label badges — dots are always rounded-full
valuestring—Text content for the label variant. Badge grows horizontally to fit.
classNamestring—Extra classes on the <span>

All other native <span> attributes are forwarded.

Sizes

SizeDiameterLabel textUse case
xs8 px— (dot only)Minimal presence indicator
sm16 px10 pxIcon button overlays, nav items
md20 px12 pxStandard notification counts
lg24 px12 pxLarger UI elements

xs is dot-only. Passing variant="label" at xs renders a dot without text.

Appearances

{/* Solid — filled background with on-color text */}
<Badge variant="label" size="md" color="error"   appearance="solid"   value="+99" />

{/* Outline — transparent background, colored border and text */}
<Badge variant="label" size="md" color="primary" appearance="outline" value="Pro" />

Colors

ColorSolid bgOutline border/textUse case
errorbg-errorring-error text-errorUnread counts, notifications (default)
warningbg-warningring-warning text-warningAttention needed
successbg-successring-success text-successPositive / completed
infobg-inforing-info text-infoInformational
primarybg-primaryring-primary text-primaryHighlighted / featured
secondarybg-secondaryring-border text-foregroundNeutral / low emphasis

Accessibility

  • Renders as <span> — wrap in a parent with aria-label describing the notification context
  • For screen readers, add <span className="sr-only">3 unread notifications</span> alongside the badge

Spinner

Animated loading indicators with ring, dots, and pulse variants, five sizes, intent colors including brand primary, optional track, label positions, and LTR/RTL support.

Avatar

A circular (or rounded) user avatar that displays a profile image, 1–2 character initials, or a fallback icon. Supports six sizes, six initials color variants, an optional Status dot at any corner, full RTL layout, and an AvatarGroup for stacking.

On this page

PlaygroundInstallationUsageShowcaseAPI ReferencePropsSizesAppearancesColorsAccessibility