Skip to main content

Segmented Button API Overview

Initialization

<script>
import { Segmented } from "wx-svelte-core";

const options = [
{ id: 1, name: "One"},
{ id: 2, name: "Two"},
{ id: 3, name: "Three"}
];
</script>

<Segmented {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

cssadds a custom style to a Segmented button
optionsspecifies a set of options to be used as segments of the control
valuesets the selected segment

Segmented Button Events

selectfires when a new segment is selected in a segmented button