fma-ds

Badge

A small label for status, count, or category — inline with text or attached to another element.

Data displaycustomizedMITChangelogRegistry JSON

Overview

  • Semantic variants: info, success, warning, destructive and invert, in solid, -light and -outline styles.
  • Neutral: muted/muted-outline for inactive or pending states.
  • Brand: brand, brand-light, brand-outline and brand-dot in the theme's second identity color, for identity labels ("New", "AI", "Pro"), never for status.
  • Dots: a *-dot family (primary, secondary, brand, success, warning, info, destructive, muted) that shows a colored dot before plain text, for select items and dense lists.
  • Shape: size and radius options.

Can also render as a link.

Installation

  1. 1

    Register the @fma-ds namespace in components.json (once)

    components.json
    {  "registries": {    "@fma-ds": "https://ds.fmartinsandre.dev.br/r/{name}.json"  }}
  2. 2

    Add the item

    pnpm dlx shadcn@latest add @fma-ds/badge

    Files land in components/fma-ds/badge.tsx; npm and registry dependencies are installed along with them.

Dependencies

npm
class-variance-authority@^0.7.1cn@^0.5.0
Registry
None