{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pill",
  "title": "Pill",
  "description": "The look a row of choices shares: a muted track, labels that darken on hover, a backdrop under the pointer and a pill in the primary colour. Tabs and Segmented control share it.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/lib/pill.ts",
      "content": "/*\n * The look a row of choices shares, so the Tabs and the Segmented control\n * read as one family: a muted track, labels that darken on hover, a backdrop\n * that glides under the pointer, and a pill in the primary colour that\n * slides to the pick.\n */\n\n/**\n * The track. Its 3px inset is shadcn's own: the pill covers it, so a spring\n * that overshoots at the first or last item still has room. Give it a\n * layout, with `pillRowClassName` inside.\n */\nexport const pillTrackClassName = 'bg-muted overflow-hidden rounded-(--list-radius)'\n\n/** The row of items, and the pill's copy of it, so every label sits exactly on its twin. */\nexport const pillRowClassName = 'gap-0.5 p-[3px]'\n\n/**\n * An item: the control height less the track's inset on both sides, so the\n * track is as tall as a button. It clips what rolls in it up and down, such as\n * a tab's icon, as a Button does, so nothing it rolls adds to the row's\n * height, which a scroller would scroll and ui-sdk measures its indicator by. Its corner is the pill's, inside the\n * track's by about the inset, so its focus ring, the backdrop (which takes\n * the item's corners) and the pill share one shape.\n */\nexport const pillItemLayout =\n  \"inline-flex overflow-y-clip h-[calc(var(--control-height)_-_6px)] items-center justify-center gap-1.5 rounded-[max(0px,calc(var(--list-radius)-2px))] px-[calc(var(--control-padding)_+_2px)] text-sm font-medium whitespace-nowrap select-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n\n/**\n * An item's label colours and focus ring. A disabled item fades its label,\n * not itself, so its focus ring keeps its strength. Read-only items don't\n * answer hover. Forced colours drop the fade, so a disabled item there takes\n * the system's GrayText.\n */\nexport const pillItemClassName =\n  'text-foreground/60 focus-visible:ring-ring/50 transition-[color,box-shadow] duration-(--motion-press-duration) ease-(--motion-press-fade-easing) not-data-disabled:not-data-readonly:hover:text-foreground focus-visible:ring-3 focus-visible:outline-hidden not-data-disabled:focus-visible:text-foreground data-disabled:text-foreground/30 forced-colors:data-disabled:text-[GrayText]'\n\n/** The backdrop under the pointer: give it `highlightClassName`. */\nexport const pillBackdropClassName = 'bg-foreground/8 -z-10'\n\n/**\n * The pill and the labels it holds. Its colour reaches past its box, so a\n * spring that overshoots the first or last item keeps its round corners up\n * to the track's edge. Forced colours drop backgrounds and shadows, so there\n * it takes the system's highlight.\n */\nexport const pillClassName =\n  'bg-primary text-primary-foreground shadow-[0_0_0_0.5rem_var(--primary)] forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:forced-color-adjust-none'\n",
      "type": "registry:lib",
      "target": "@lib/pill.ts"
    }
  ],
  "type": "registry:lib"
}