Skip to main content

Switch Button API Overview

Initialization

import { Switch } from "@svar-ui/react-core";

// minimal configuration for initialization
export function App() {
return <Switch />;
}
tip
  • Visit the Features Guide to learn more about the control's functionality.
  • Explore the samples to visualize the available features.

Switch Button Properties

checkedOptional. Defines whether a control is switched on/off
disabledOptional. Defines whether a switch button is disabled
idOptional. Sets an HTML id for a switch button
valueOptional. Defines whether a control is switched on/off

Switch Button Events

changeFires when a new value is selected in the control