# Resolution Picker

Segmented resolution selector with a sliding indicator and positional dot-matrix density glyphs.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

<ComponentPreview name="resolution-picker">
  <ResolutionPickerDemo />
</ComponentPreview>

## Installation [#installation]

```bash
npx shadcn@latest add https://motif.sweetretry.com/r/resolution-picker.json
```

## Usage [#usage]

```tsx
import { ResolutionPicker } from "@/components/ui/motif/resolution-picker";

export function Output() {
  const [resolution, setResolution] = useState("2K");

  return (
    <div className="space-y-2">
      <div className="font-medium text-muted-foreground text-xs">
        Resolution
      </div>
      <ResolutionPicker
        aria-label="Resolution"
        onChange={setResolution}
        value={resolution}
      />
    </div>
  );
}
```

- Renders no label; pass `aria-label` alongside your own heading.
- Keep `options` in ascending order: dot counts (2–4 dots) are assigned positionally rather than parsed from labels (two options receive 2 and 4 dots).
- `motion-reduce:transition-none` disables the sliding indicator transition.

<ResolutionPickerPairDemo />

## Accessibility [#accessibility]

- Renders `role="group"` named by `aria-label` with `<button aria-pressed>` cells; dot glyphs are `aria-hidden`.

## Component source [#component-source]

<ComponentSource
  name="resolution-picker"
  src="registry/new-york/resolution-picker.tsx"
  title="resolution-picker.tsx"
/>
