Skip to main content

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

cssOptional. Adds a custom style to a Segmented button
optionsOptional. Specifies a set of options to be used as segments of the control
valueOptional. Sets the selected segment

Segmented Button Events

changeFires when a new segment is selected in the segmented button