Select
Un select natif utilisable comme contrôle de formulaire, avec options projetées.
Disponible pour
Angular: disponible Vue: disponible React: disponible React Native: disponible
Utilisation
Selected: en
Pick a workspace to continue.
<div soneFieldGroup style="max-width: 20rem">
<div soneField>
<label soneFieldLabel for="demo-language">Language</label>
<sone-select selectId="demo-language" [(value)]="language">
<option value="auto">Detect automatically</option>
<option value="en">English</option>
<option value="de">Deutsch</option>
<option value="fr">Français</option>
</sone-select>
<p soneFieldDescription>Selected: {{ language() }}</p>
</div>
<div soneField invalid>
<label soneFieldLabel for="demo-workspace">Workspace</label>
<sone-select selectId="demo-workspace" invalid value="">
<option value="">Choose a workspace…</option>
<option value="team">Team workspace</option>
</sone-select>
<p soneFieldError>Pick a workspace to continue.</p>
</div>
<div class="demo-row">
<sone-select size="sm" ariaLabel="Sort order" value="newest">
<option value="newest">Newest first</option>
<option value="oldest">Oldest first</option>
</sone-select>
<sone-select disabled ariaLabel="Region (locked)" value="eu">
<option value="eu">Europe</option>
</sone-select>
</div>
</div>Importation
import {
SoneSelectComponent,
} from "@surface-one/angular/select";Référence de l’API
SoneSelectComponentComposant
| Nom | Type | Par défaut |
|---|---|---|
ariaLabel | string | null | null |
size | NativeSelectSize | "default" |
selectId | string | null | null |
name | string | null | null |
invalid | boolean | false |
ariaDescribedbyExtra ids for `aria-describedby` on the inner `<select>`. | string | null | null |
valuebidirectionnelThe selected value for `[(value)]`. `valueChange` fires only when the user picks an option — a forms write (`writeValue` from `formControl` / `ngModel`) updates the display without emitting it. | string | "" |
disabled | boolean | false |
| Nom | Type |
|---|---|
selectionChangeFires ONLY when the user picks an option — never on any programmatic write. | string |