Segmented — Playground

px
size
State
html.html
<kui-segmented [(value)]="view" aria-label="Project view" (touch)="onTouch()">
  <button kuiSegment value="list">List</button>
  <button kuiSegment value="board">Board</button>
  <button kuiSegment value="timeline">Timeline</button>
</kui-segmented>
Segmented events
  • No events yet.
NameTypeDefaultDescription
[(value)]string''Selected segment value. Implements FormValueControl for [formField] integration, or bind directly for standalone use.
[(selected)]string''Deprecated alias for value, kept in sync with it. Use value instead; planned for removal in the next major version.
size'xs' | 'sm' | 'md' | 'lg' | undefinedundefinedControl height and spacing for the whole segmented group. Falls back to defaults.segmented.size, then the global defaults.size, then md.
disabledbooleanfalseDisables every segment. Set by [formField] or directly.
invalidbooleanfalseMarks the control as having validation errors. Set by [formField].
errorsreadonly WithOptionalFieldTree<ValidationError>[][]Current validation errors. Set by [formField].
touchedbooleanfalseWhether the control has been touched. Set by [formField].
(touch)void-Emitted whenever an enabled segment is selected, including one that was already selected; marks the control as touched in the form system. Focus and blur alone do not emit it.
button[kuiSegment].valuestring''Value emitted when the segment is selected.
button[kuiSegment].disabledbooleanfalseDisables one segment and removes it from keyboard selection.
focus(options?)(options?: FocusOptions) => void-Focuses the selected segment, or the first enabled one when nothing is selected, so Signal Forms focusBoundControl() reaches the control. Does nothing while every segment is disabled.
required--Not available: a segmented control always shows one active segment, so it exposes no required state.
KuiSegmentedOptionsinterface-Shape of defaults.segmented: size.

Inputs verified against @kikita-labs/ui v2.0.0 public typings.