Skip to main content

css

Description

Optional. Adds a custom style to a Segmented button

Usage

css?: string;

Example

<div class="demo-box">
<Segmented css="my" options={optionsText} bind:value />
</div>

<style>
/* styling segments of the control */
.demo-box :global(div.my button){
background-color: gold;
}

/* styling the selected segment */
.demo-box :global(div.my button.selected){
background-color: green;
}
</style>

Details

You can stylize the segments of the button and change the look of the selected segment as well.

Related article: Styling a Segmented button