Segmented
iOS-style segmented control buttons.
Preview
A preview of the Segmented component with interactive controls.
Interactive
Installation
Add the Segmented component to your project.
ng g @ng-cn/core:c segmentedUsage
Import and use the Segmented component in your Angular application.
<Segmented [(ngModel)]="value">
<SegmentedItem value="all">All</SegmentedItem>
<SegmentedItem value="active">Active</SegmentedItem>
<SegmentedItem value="draft">Draft</SegmentedItem>
<SegmentedItem value="archived">Archived</SegmentedItem>
</Segmented>Examples
Explore different variations and use cases for the Segmented component.
Basic
Interactive
API Reference
Props | Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | string | — | The default selected value. |
value | string | — | The controlled value. |