Contractus componentis
select
<select> nativum ut custom element design system involutum — optiones per prop traduntur, dsChange cum novo valore emittit.
- Versio
- v1.0.0
Props
| Nomen | Genus | Valores | Praefinitum |
|---|---|---|---|
| value | string | — | — |
| name | string | — | — |
| disabled | boolean | — | false |
| size | enum | md, lg | md |
| label | string | — | — |
| options | string | — | [] |
Eventus
| Nomen | Onus | Condicio |
|---|---|---|
| dsChange | string | — |
Slot
- Nomen
- default
- Propositum
- not used — options are passed via the `options` prop as JSON string or array. Slotted <option> children are NOT projected into the internal <select>.
Tokens
- spacing
- primitive.spacing.sm, primitive.spacing.md, primitive.spacing.lg, primitive.spacing.xl
- radius
- primitive.radius.sm, primitive.radius.md
- font
- primitive.font.family, primitive.font.size-md
Aditus
- native_element
- select
- labeling
- aria-label via the label prop (canonical) or ambient <label> wrapper (secondary, browser-computed accessible name).
- keyboard
- ["Tab focuses","Enter opens native popup","Arrow keys navigate options","Escape closes without change","Printable characters typeahead"]
- disabled_semantics
- native_disabled_attribute
- notes
- label prop is REQUIRED for WCAG conformance — a <select> with no accessible name fails axe rule select-name. Passing an ambient <label> around <ds-select> is best-effort and depends on browser accessible-name computation.
JSON probatum crudum
{
"name": "select",
"version": "1.0.0",
"props": {
"value": {
"type": "string"
},
"name": {
"type": "string"
},
"disabled": {
"type": "boolean",
"default": false
},
"size": {
"type": "enum",
"values": [
"md",
"lg"
],
"default": "md"
},
"label": {
"type": "string"
},
"options": {
"type": "string",
"default": "[]"
}
},
"events": {
"dsChange": {
"payload": "string"
}
},
"slot": {
"name": "default",
"purpose": "not used — options are passed via the `options` prop as JSON string or array. Slotted <option> children are NOT projected into the internal <select>."
},
"tokens_used": {
"spacing": [
"primitive.spacing.sm",
"primitive.spacing.md",
"primitive.spacing.lg",
"primitive.spacing.xl"
],
"radius": [
"primitive.radius.sm",
"primitive.radius.md"
],
"font": [
"primitive.font.family",
"primitive.font.size-md"
]
},
"a11y": {
"native_element": "select",
"labeling": "aria-label via the label prop (canonical) or ambient <label> wrapper (secondary, browser-computed accessible name).",
"keyboard": [
"Tab focuses",
"Enter opens native popup",
"Arrow keys navigate options",
"Escape closes without change",
"Printable characters typeahead"
],
"disabled_semantics": "native_disabled_attribute",
"notes": "label prop is REQUIRED for WCAG conformance — a <select> with no accessible name fails axe rule select-name. Passing an ambient <label> around <ds-select> is best-effort and depends on browser accessible-name computation."
}
}