Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Native Select

The browser's own select, styled like the kit's fields. Phones open their own picker.

Installation

pnpm add @heyramzi/ui

Usage

import * as NativeSelect from "@heyramzi/ui/shadcn/native-select";
<NativeSelect.Root bind:value={status} aria-label="Status">
  <NativeSelect.Option value="todo">To do</NativeSelect.Option>
  <NativeSelect.Option value="done">Done</NativeSelect.Option>
</NativeSelect.Root>

API reference

NativeSelect.Root

size "sm" | "default"
Default "default"
ref bindable HTMLSelectElement | null
Default null
value bindable HTMLSelectAttributes
class string
children Snippet
...rest
Every prop of HTMLSelectAttributes from svelte/elements except size
Prop Type Default
size "sm" | "default" "default"
ref bindable HTMLSelectElement | null null
value bindable HTMLSelectAttributes
class string
children Snippet
...rest Every prop of HTMLSelectAttributes from svelte/elements except size

NativeSelect.Option

ref bindable HTMLOptionElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLOptionAttributes from svelte/elements
Prop Type Default
ref bindable HTMLOptionElement | null null
class string
children Snippet
...rest Every prop of HTMLOptionAttributes from svelte/elements

NativeSelect.OptGroup

ref bindable HTMLOptgroupElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLOptgroupAttributes from svelte/elements
Prop Type Default
ref bindable HTMLOptgroupElement | null null
class string
children Snippet
...rest Every prop of HTMLOptgroupAttributes from svelte/elements