Tessina UI
ConfiguratorGitHubIntroduction
InstallationUsageTheming
ComponentsAccordionAction SheetAlertAlertDialogArea ChartAspectRatioAvatarBadgeBannerBar ChartBottom NavBreadcrumbButtonButtonGroupCalendarCardCarouselChartChatBubbleCheckboxChipCodeBlockCollapsibleColor PickerComboboxCommandContainerContextMenuDate PickerDividerDrawerDropdown MenuEmptyStateFABFieldFieldsetFile UploadFile Upload 2FlexFormGridHoverCardIconButtonLabelLine ChartLinkMenubarMeterModalNavigation MenuNumberFieldOTP InputPaginationPie ChartPopoverProgressPromptInputRadar ChartRadial ChartRadioRatingScroll AreaSearchSegmentedControlSelectShortcutSidebarSkeletonSliderSpacerSpinnerSplit ButtonStackStatusStepperSurfaceSwitchTableTabsTextareaTime PickerToastToggleButtonToggleGroupToolbarTooltipTop Header DesktopTop Header Mobile
Contributing
Components

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" />

Examples

Default

A label badge in the primary color.

Colors

Six semantic colors via the color prop.

Dot

Use variant="dot" for a compact status indicator with no text.

Sizes

Label badges in sm, md, and lg.

Appearance

Switch between solid and outline with the appearance prop.

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

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.

Banner

A promotional banner for curations, promotions, events, and programs — with an overline, headline, body, one or more call-to-actions, and a disclaimer. Color, full-bleed image, or inset-image backgrounds; three sizes; light and dark mode.

On this page

PlaygroundInstallationUsageExamplesDefaultColorsDotSizesAppearanceAPI ReferencePropsSizesAppearancesColorsAccessibility