Select API Overview
Initialization
<script>
import { Select } from "@svar-ui/svelte-core";
const dataset = [
{id: 1, label: "First option"},
{id: 2, label: "Second option"},
{id: 3, label: "Third option"}
]
</script>
<Select options={dataset}/>
tip
- Visit the Features Guide to learn more about the control's functionality.
- Explore the samples to visualize the available features.
Select Properties
clear | Optional. Adds the Clear button into the input |
disabled | Optional. Defines whether a select is disabled |
error | Optional. Defines whether error styling is applied to a select |
id | Optional. Sets an HTML id for a select |
options | Optional. Specifies a set of data items that will be used as select options |
placeholder | Optional. Sets a placeholder for the text field of Select |
textField | Optional. Binds Select options to the input field by the specified key |
title | Optional. Sets a tooltip text with additional info about the control |
value | Optional. Sets the value of a select |
Select Events
change | Fires when a new value is selected in the control |