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 fractalsvelte
Import
<script lang="ts">
	import { NativeSelect } from 'fractalsvelte';
</script>

Usage

Usage
<script lang="ts">
	import { NativeSelect } from 'fractalsvelte';
</script>

<NativeSelect options={options} />

Props

PropTypeDefaultDescription
options(Option | OptGroup)[]-Options, optionally nested into labelled groups.
valuestring''The selected value. Supports bind:.
disabledbooleanfalsePrevents interaction while preserving semantic state.
invalidbooleanfalseApplies the invalid styling and sets aria-invalid.
namestring-The form field name submitted with the value.