Skip to main content

Combo API Overview

Initialization

<script>
import { Combo } from "@svar-ui/svelte-core";

const dataset = [
{id:1, label:"First option"},
{id:2, label:"Second option"},
{id:3, label:"Third option"}
]
</script>

<Combo options={dataset}/>
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

Combo Properties

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

Combo Events

changeFires when a new option is selected in a combo