fma-ds

Checkbox

A control for a single on/off/indeterminate value.

FormscustomizedMITChangelogRegistry JSON

Overview

Pair it with an external Label (via id/htmlFor) laid out as a flex row, rather than passing label text as children.

  • `CheckboxGroup`: gathers several under one label and a value array (react-aria CheckboxGroup; each Checkbox takes a value).
  • `CheckboxCard`: a choice card — the whole card is the checkbox, its children are the content (an IconTile, FieldContent with FieldTitle and FieldDescription) and a square indicator sits at the end. Selected cards take a primary tint, hovered ones accent.

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

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

Dependencies

npm
cn@^0.5.0lucide-react@^1.61.0react-aria-components@^1.22.1