Skip to main content

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

clearOptional. Adds the Clear button into the input
disabledOptional. Defines whether a select is disabled
errorOptional. Defines whether error styling is applied to a select
idOptional. Sets an HTML id for a select
optionsOptional. Specifies a set of data items that will be used as select options
placeholderOptional. Sets a placeholder for the text field of Select
textFieldOptional. Binds Select options to the input field by the specified key
titleOptional. Sets a tooltip text with additional info about the control
valueOptional. Sets the value of a select

Select Events

changeFires when a new value is selected in the control