Skip to main content

Select API Overview

Initialization

<script>
import { Select } from "wx-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

disableddefines whether a select is disabled
errordefines whether error styling is applied to a select
idsets an HTML id for a select
labelbinds Select options to the input field by the specified key
optionsspecifies a set of data items that will be used as select options
placeholdersets a placeholder for the text field of Select
titlesets a tooltip text with additional info about the control
valuesets the value of a select