# ProductVariationSelect

One choice on a product page with its name shown: a hairline, the label, and the options of the variant selector.

Code: `components/ui/product-variation-select.tsx`. Figma: Product Variation Select, node 2100:689. Live: https://design.id-hub.dk/components/product-variation-select

```tsx
import { ProductVariationSelect } from '@/components/ui/product-variation-select';

<ProductVariationSelect
  label="Størrelse"
  name="size"
  defaultValue="L"
  options={[{ value: 'S', label: 'S' }, { value: 'M', label: 'M' }, { value: 'L', label: 'L' }]}
  more={9}
/>
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| label (required) | `string` |  | What is being chosen, such as "Størrelse". Shown above the options and read aloud as the name of the group. |
| ...picker | `VariationPickerProps` |  | Everything VariationPicker takes: name, options, value, defaultValue, onChange, more, moreHref, moreLabel. |

Do:
- Use one per choice on a product page: one for colour, one for size.
- Stack them; each brings its own hairline.

Do not:
- Do not use it in a listing or a card. There the options stand alone, as VariationPicker.
- Do not add a second label above it.

Accessibility:
- The label is shown once for the eye and read once as the name of the radio group.
- Everything else is VariationPicker: native radio buttons, arrow keys, a form post.

Tokens it uses:
- color.border.default
- color.text.default
- type.body.sm
- space.inline.1
- space.inline.3

---

Drawn in Figma: one of the 8 components that may be used anywhere, the public site included. All of them: https://design.id-hub.dk/components.md. Token values: https://design.id-hub.dk/tokens.md.

Index of everything, as text: https://design.id-hub.dk/llms.txt. Never invent a colour, a size, a component or a product fact: if it is not here, it does not exist yet.
