PropertyAttributeDescriptionTypeDefaultbackgroundColor 🚫background-colordeprecated since v3.0.0, will be removed with next major release. Background color variationstype SegmentedControlBackgroundColor = undefined 'background-surface' 'background-default'undefinedcolumns 🛠columnsSets the amount of columns.type SegmentedControlColumns = 'auto' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 BreakpointCustomizable<SegmentedControlColumns>'auto'compact compactA boolean value that, if present, renders the segmented-control as a compact version.booleanfalsedisabled disabledDisables the segmented-control.booleanfalseform formThe id of a form element the segmented-control should be associated with.stringundefinedname nameThe name of the segmented-control.stringundefinedtheme themeAdapts the segmented-control color depending on the theme.type Theme = 'light' 'dark' 'auto''light'value valueSets the initial value of the segmented-control.string numberundefined
Events
prev
next
EventDescriptionTypeblur Emitted when the segmented-control has lost focus.CustomEvent<void>change Emitted when the selection is changed.type SegmentedControlChangeEventDetail = { value: string | number; } CustomEvent<SegmentedControlChangeEventDetail>segmentedControlChange 🚫deprecated since v3.0.0, will be removed with next major release, use update event instead. Emitted when selected element changes.type SegmentedControlUpdateEventDetail = { value: string | number; } CustomEvent<SegmentedControlUpdateEventDetail>update 🚫deprecated since v3.30.0, will be removed with next major release, use change event instead. Emitted when selected element changes.type SegmentedControlUpdateEventDetail = { value: string | number; } CustomEvent<SegmentedControlUpdateEventDetail>
Slots
prev
next
SlotDescriptionisRequiredaltPropallowedTagNames<slot> Default slot for the `p-segmented-control-item` tags.
SlotDescriptionisRequiredaltPropallowedTagNames<slot> Default slot for the content.
CSS Variables
prev
next
CSS VariableDescriptiondefaultValue--p-hyphens Sets the CSS `hyphens` property for text elements, controlling whether words can break and hyphenate automatically.auto