Segmented Button API Overview
Initialization
import { Segmented } from "@svar-ui/react-core";
const options = [
{ id: 1, label: "One" },
{ id: 2, label: "Two" },
{ id: 3, label: "Three" }
];
export default function App() {
return <Segmented options={options} />;
}
tip
- Visit the Features Guide to learn more about the control's functionality.
- Explore the samples to visualize the available features.
Segmented Button Properties
css | Optional. Adds a custom style to a Segmented button |
options | Optional. Specifies a set of options to be used as segments of the control |
value | Optional. Sets the selected segment |
Segmented Button Events
change | Fires when a new segment is selected in the segmented button |