Combo API Overview
Initialization
import { Combo } from "@svar-ui/react-core";
const dataset = [
{ id: 1, label: "First option" },
{ id: 2, label: "Second option" },
{ id: 3, label: "Third option" }
];
function Example() {
return <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
clear | Optional. Adds the Clear button into a combo input |
disabled | Optional. Defines whether a combo is disabled |
error | Optional. Defines whether error styling is applied to a combo |
id | Optional. Sets an id for a combo |
options | Optional. Specifies a set of data items that will be used as combo options |
placeholder | Optional. Sets the text of the input's placeholder |
textField | Optional. Binds combo options to the input field by the specified key |
textOptions | Optional. Specifies a set of data items that will be used in the input and hidden from dropdown |
title | Optional. Sets a tooltip text with additional info about the control |
value | Optional. Sets the value of a combo |
Combo Events
change | Fires when a new option is selected in a combo |