Skip to main content

Select

The ty-select component allows users to drop down a list of options and choose one. It's an essential component for collecting user input in forms, settings pages, or any scenario where a list of options is available.

Usage

Here's how you can use the ty-select component in your HTML code:

Live Editor
<ty-select placeholder="Choose an option">
  <ty-option value="option1" label="Option 1"></ty-option>
  <ty-option value="option2" label="Option 2"></ty-option>
</ty-select>
Result
Loading...

API

The ty-select component accepts the following properties:

Properties

NameDescriptionTypeDefault
placeholderPlaceholder textString''
valueValue of the selected optionString''
labellabel of the selected optionString''
disabledDisable the select componentBooleanfalse

Events

NameDescriptionDetail
ty-changeFires when the select changes{ value: string, label: string }