# Kbd

Native keyboard notation and grouped shortcut keys.

[All components](https://rickylabs.github.io/netscript/design-system/components/) · [Theme builder](https://rickylabs.github.io/netscript/create/) · [Implementation source](https://github.com/rickylabs/netscript/blob/main/packages/fresh-ui/registry/components/ui/kbd.tsx)

## Live preview

[Open live kbd preview](https://rickylabs.github.io/netscript/assets/fresh-ui/preview/?component=kbd&theme=studio-utility)

## Install

```bash
netscript ui:add kbd
```

## Usage and examples

The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.

```tsx
import { useState } from 'preact/hooks';
import { Kbd } from '@app/components/ui/kbd.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><Kbd>Ctrl+K</Kbd></div><p role="status">{notice}</p></>);
}
```

## Props

Generated from native `deno doc --json --private` over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.

| Owner | Prop | Type | Optional | Description |
| --- | --- | --- | --- | --- |
| `KbdProps` | `children` | `ComponentChildren` | No |  |
| `KbdProps` | `size` | `"sm" \| "md"` | Yes |  |
| `KbdProps` | `variant` | `"default" \| "inverse"` | Yes |  |
| `KbdProps` | `class` | `string` | Yes |  |

```typescript
KbdProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "size" | "class">
```

## Keyboard

Presentation component; no component-specific keyboard interactions.

## Tokens

Semantic contract roles: `border/default`, `font/mono`, `radius/badge`, `size/kbd`, `surface/card`, `text/inverse`, `text/muted`.

CSS custom properties referenced directly: `--ns-border`, `--ns-border-width`, `--ns-card`, `--ns-font-mono`, `--ns-inverse-fg`, `--ns-muted-fg`, `--ns-radius-badge`, `--ns-space-1`, `--ns-text-caption`.

## Contract and compatibility

Accessibility pattern: native kbd notation; no keyboard interaction

- Native kbd notation is noninteractive; Kbd.Group joins keys with decorative plus separators.

Design contract values marked planned are not implementation props. The props above describe what ships today.
