Native Select
The platform select control with a typed option list.Examples
Installation
Install the package, then import only the components a route uses. Exports are tree-shakable.
Install
pnpm add fractalsvelteImport
<script lang="ts">
import { NativeSelect } from 'fractalsvelte';
</script>Usage
Usage
<script lang="ts">
import { NativeSelect } from 'fractalsvelte';
</script>
<NativeSelect options={options} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
options | (Option | OptGroup)[] | - | Options, optionally nested into labelled groups. |
value | string | '' | The selected value. Supports bind:. |
disabled | boolean | false | Prevents interaction while preserving semantic state. |
invalid | boolean | false | Applies the invalid styling and sets aria-invalid. |
name | string | - | The form field name submitted with the value. |
