Select
A select list enables users to select one or more items from a list.
A select component consists of a toggle control to open and close a menu of actions or links. Selects differ from dropdowns in that they persist selection, whereas dropdowns are typically used to present a list of actions or links.
Installation
We recommend loading elements via a CDN such as JSPM and using an import map to manage your dependencies.
For more information on import maps and how to use them, see the import map reference on MDN Web Docs.
If you are using node and NPM, you can install this component using npm:
npm install @patternfly/elements
Then import this component into your project by using a bare module specifier:
import '@patternfly/elements/pf-select/pf-select.js';
Please Note You should either load elements via a CDN or install them locally through NPM. Do not do both.
Overview
Installation
npm install @patternfly/elements
Usage
Single
Focus on options using arrow keys or by typing the first character of an option.
View HTML Source
<section id="select-demo"> <pf-select placeholder="Select a title" accessible-label="Title"> <pf-option>Mr</pf-option> <pf-option>Miss</pf-option> <pf-option>Mrs</pf-option> <pf-option>Ms</pf-option> <hr> <pf-option>Dr</pf-option> <pf-option>Other</pf-option> </pf-select> </section>
<script type="module"> import '@patternfly/elements/pf-select/pf-select.js'; </script>
<style> #select-demo { padding: 1em; & pf-select { max-width: 300px; } } </style>
Single with description
View HTML Source
<section id="description-demo"> <pf-select accessible-label="Title"> <pf-option description="This is a description">Mr</pf-option> <pf-option description="This is a description">Miss</pf-option> <pf-option description="This is a description">Mrs</pf-option> <pf-option description="This is a description">Ms</pf-option> <pf-option>Dr <span slot="description">Descriptions can <em>also</em> be HTML</span> </pf-option> <pf-option description="This is a description">Other</pf-option> </pf-select> </section>
<script type="module"> import '@patternfly/elements/pf-select/pf-select.js'; </script>
<style> #description-demo { padding: 1em; & pf-select { max-width: 300px; } } </style>
Grouped single
View HTML Source
<section id="grouped-select-demo"> <pf-select accessible-label="Status"> <pf-option-group label="Status" key="group1"> <pf-option value="0">Running</pf-option> <pf-option value="1">Stopped</pf-option> <pf-option value="2">Down</pf-option> <pf-option value="3">Degraded</pf-option> <pf-option value="4">Needs maintenance</pf-option> </pf-option-group> <hr> <pf-option-group label="Vendor names" key="group2"> <pf-option value="5">Dell</pf-option> <pf-option value="6" disabled>Samsung</pf-option> <pf-option value="7">Hewlett-Packard</pf-option> </pf-option-group> </pf-select> </section>
<script type="module"> import '@patternfly/elements/pf-select/pf-select.js'; </script>
<style> #grouped-select-demo { padding: 1em; & pf-select { max-width: 300px; } } </style>
Checkbox input
Multiple options can be selected. Any arrow keys work. Shift will toggling off multiple items. Ctrl+A will toggle selection on all items.
View HTML Source
<section id="checkbox-select-demo"> <pf-select variant="checkbox" accessible-label="Status" placeholder="Filter by status"> <pf-option description="This is a description">Active</pf-option> <pf-option>Cancelled</pf-option> <pf-option>Paused</pf-option> <hr> <pf-option>Warning</pf-option> <pf-option>Restarted</pf-option> </pf-select> </section>
<script type="module"> import '@patternfly/elements/pf-select/pf-select.js'; </script>
<style> #checkbox-select-demo { padding: 1em; max-width: 400px; } </style>
When setting the disabled
attribute on options, they are still focusable, but
they are not selectable. This is in order that they remain accessible to screen
readers. This functions similarly to the aria-disabled="true"
attribute.
Note: WAI-ARIA recommends elements of a larger composite widget remain focusable.
Accessibility
The select uses the Combobox Pattern recommendations from the WAI ARIA Authoring Best Practices Guide (APG).
When the dropdown is disabled it follows WAI ARIA focusability recommendations for composite widget elements, where dropdown items are still focusable even when the dropdown is disabled.
Toggle button and typeahead input
When focus is on the toggle button, the following keyboard interactions apply:
Key | Function |
---|---|
Enter | Opens the listbox. |
Space | Opens the listbox. |
Down Arrow | Opens the listbox and moves focus to the first listbox item. |
Tab | Moves focus out of select element onto the next focusable item and closes listbox. |
Shift + Tab | Moves focus out of select element onto the previous focusable item and closes listbox. |
Listbox options
Listbox options use the APG's Roving tabindex recommendation. When focus is on the listbox, the following keyboard interactions apply:
Key | Function |
---|---|
Enter | Selects the options and closes the listbox. |
Space | Selects the options and closes the listbox. |
Shift | Enables multiselect. |
Control + A | Selects all options. |
Tab | Moves focus out of select element onto the next focusable options and closes listbox. |
Shift + Tab | Moves focus to the toggle button and closes listbox. |
Up Arrow | Moves focus to the previous option, optionally wrapping from the first to the last. |
Down Arrow | Moves focus to the next option, optionally wrapping from the last to the first. |
Left Arrow | Moves focus to the previous option, optionally wrapping from the first to the last. |
Right Arrow | Moves focus to the next option, optionally wrapping from the last to the first. |
Home | Moves focus to the first option in the current listbox. |
End | Moves focus to the last option in the current listbox. |
Escape | Close the listbox that contains focus and return focus to the toggle button. |
Any letter | Navigates to the next option that starts with the letter. |
Slots on pf-select
- Default Slot
-
insert
pf-option
and/orpf-option-groups
here -
placeholder
-
placeholder text for the select. Overrides the
placeholder
attribute.
Attributes on pf-select
variant
-
Variant of rendered Select
- DOM Property
variant
- Type
-
'single' | 'checkbox' | 'typeahead' | 'typeaheadmulti'
- Default
-
'single'
accessible-label
-
Accessible label for the select
- DOM Property
accessibleLabel
- Type
-
string | undefined
- Default
-
unknown
accessible-current-selections-label
-
Accessible label for chip group used to describe chips
- DOM Property
accessibleCurrentSelectionsLabel
- Type
-
string
- Default
-
'Current selections'
items-selected-text
-
Multi listbox button text
- DOM Property
itemsSelectedText
- Type
-
string
- Default
-
'items selected'
disabled
-
Whether the select is disabled
- DOM Property
disabled
- Type
-
boolean
- Default
-
false
expanded
-
Whether the select listbox is expanded
- DOM Property
expanded
- Type
-
boolean
- Default
-
false
enable-flip
-
Enable to flip listbox when it reaches boundary
- DOM Property
enableFlip
- Type
-
boolean
- Default
-
false
value
-
Current form value
- DOM Property
value
- Type
-
string | undefined
- Default
-
unknown
placeholder
-
Placeholder entry. Overridden by the
placeholder
slot- DOM Property
placeholder
- Type
-
string | undefined
- Default
-
unknown
position
-
Indicates initial popover position. There are 6 options:
bottom
,top
,top-start
,top-end
,bottom-start
,bottom-end
. Default isbottom
.- DOM Property
position
- Type
-
Placement
- Default
-
'bottom'
checkbox-selection-badge-hidden
-
Flag indicating if selection badge should be hidden for checkbox variant,default false
- DOM Property
checkboxSelectionBadgeHidden
- Type
-
boolean
- Default
-
false
selected
-
Single select option value for single select menus, or array of select option values for multi select.
- DOM Property
selected
- Type
-
PfOption[]
- Default
-
unknown
Methods on pf-select
show()
-
Opens the dropdown
hide()
-
Closes listbox
toggle()
-
toggles popup based on current state
Events on pf-select
open
-
when the menu toggles open
Event Type:unknown
close
-
when the menu toggles closed
Event Type:unknown
CSS Custom Properties on pf-select
CSS Property | Description | Default |
---|---|---|
--pf-c-select__toggle--PaddingTop |
var(--pf-global--spacer--form-element, 0.375rem)
|
|
--pf-c-select__toggle--PaddingRight |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle--PaddingBottom |
var(--pf-global--spacer--form-element, 0.375rem)
|
|
--pf-c-select__toggle--PaddingLeft |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle--MinWidth |
var(--pf-global--target-size--MinWidth, 44px)
|
|
--pf-c-select__toggle--FontSize |
var(--pf-global--FontSize--md, 1rem)
|
|
--pf-c-select__toggle--FontWeight |
var(--pf-global--FontWeight--normal, 400)
|
|
--pf-c-select__toggle--LineHeight |
var(--pf-global--LineHeight--md, 1.5)
|
|
--pf-c-select__toggle--BackgroundColor |
var(--pf-global--BackgroundColor--100, #fff)
|
|
--pf-c-select__toggle--before--BorderTopWidth |
var(--pf-global--BorderWidth--sm, 1px)
|
|
--pf-c-select__toggle--before--BorderRightWidth |
var(--pf-global--BorderWidth--sm, 1px)
|
|
--pf-c-select__toggle--before--BorderBottomWidth |
var(--pf-global--BorderWidth--sm, 1px)
|
|
--pf-c-select__toggle--before--BorderLeftWidth |
var(--pf-global--BorderWidth--sm, 1px)
|
|
--pf-c-select__toggle--before--BorderWidth |
initial
|
|
--pf-c-select__toggle--before--BorderTopColor |
var(--pf-global--BorderColor--300, #f0f0f0)
|
|
--pf-c-select__toggle--before--BorderRightColor |
var(--pf-global--BorderColor--300, #f0f0f0)
|
|
--pf-c-select__toggle--before--BorderBottomColor |
var(--pf-global--BorderColor--200, #8a8d90)
|
|
--pf-c-select__toggle--before--BorderLeftColor |
var(--pf-global--BorderColor--300, #f0f0f0)
|
|
--pf-c-select__toggle--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__toggle--hover--before--BorderBottomColor |
var(--pf-global--active-color--100, #06c)
|
|
--pf-c-select__toggle--focus--before--BorderBottomColor |
var(--pf-global--active-color--100, #06c)
|
|
--pf-c-select__toggle--focus--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select__toggle--active--before--BorderBottomColor |
var(--pf-global--active-color--100, #06c)
|
|
--pf-c-select__toggle--active--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select__toggle--m-expanded--before--BorderBottomColor |
var(--pf-global--active-color--100, #06c)
|
|
--pf-c-select__toggle--m-expanded--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select__toggle--disabled--BackgroundColor |
var(--pf-global--disabled-color--300, #f0f0f0)
|
|
--pf-c-select__toggle--m-plain--before--BorderColor |
transparent
|
|
--pf-c-select__toggle--m-placeholder--Color |
transparent
|
|
--pf-c-select--m-invalid__toggle--before--BorderBottomColor |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-invalid__toggle--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select--m-invalid__toggle--hover--before--BorderBottomColor |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-invalid__toggle--focus--before--BorderBottomColor |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-invalid__toggle--active--before--BorderBottomColor |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-invalid__toggle--m-expanded--before--BorderBottomColor |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-invalid__toggle-status-icon--Color |
var(--pf-global--danger-color--100, #c9190b)
|
|
--pf-c-select--m-success__toggle--before--BorderBottomColor |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-success__toggle--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select--m-success__toggle--hover--before--BorderBottomColor |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-success__toggle--focus--before--BorderBottomColor |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-success__toggle--active--before--BorderBottomColor |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-success__toggle--m-expanded--before--BorderBottomColor |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-success__toggle-status-icon--Color |
var(--pf-global--success-color--100, #3e8635)
|
|
--pf-c-select--m-warning__toggle--before--BorderBottomColor |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select--m-warning__toggle--before--BorderBottomWidth |
var(--pf-global--BorderWidth--md, 2px)
|
|
--pf-c-select--m-warning__toggle--hover--before--BorderBottomColor |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select--m-warning__toggle--focus--before--BorderBottomColor |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select--m-warning__toggle--active--before--BorderBottomColor |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select--m-warning__toggle--m-expanded--before--BorderBottomColor |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select--m-warning__toggle-status-icon--Color |
var(--pf-global--warning-color--100, #f0ab00)
|
|
--pf-c-select__toggle-wrapper--not-last-child--MarginRight |
var(--pf-global--spacer--xs, 0.25rem)
|
|
--pf-c-select__toggle-wrapper--MaxWidth |
calc(100% - var(--pf-global--spacer--lg, 1.5rem))
|
|
--pf-c-select__toggle-wrapper--c-chip-group--MarginTop |
0.3125rem
|
|
--pf-c-select__toggle-wrapper--c-chip-group--MarginBottom |
0.3125rem
|
|
--pf-c-select__toggle-typeahead--FlexBasis |
10em
|
|
--pf-c-select__toggle-typeahead--BackgroundColor |
transparent
|
|
--pf-c-select__toggle-typeahead--BorderTop |
var(--pf-global--BorderWidth--sm, 1px) solid transparent
|
|
--pf-c-select__toggle-typeahead--BorderRight |
none
|
|
--pf-c-select__toggle-typeahead--BorderLeft |
none
|
|
--pf-c-select__toggle-typeahead--MinWidth |
7.5rem
|
|
--pf-c-select__toggle-typeahead--focus--PaddingBottom |
calc(var(--pf-global--spacer--form-element, 0.375rem) - var(--pf-global--BorderWidth--md))
|
|
--pf-c-select__toggle--m-placeholder__toggle-text--Color |
var(--pf-global--Color--dark-200, #6a6e73)
|
|
--pf-c-select__toggle-icon--toggle-text--MarginLeft |
var(--pf-global--spacer--xs, 0.25rem)
|
|
--pf-c-select__toggle-badge--PaddingLeft |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle-status-icon--MarginLeft |
var(--pf-global--spacer--xs, 0.25rem)
|
|
--pf-c-select__toggle-status-icon--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__toggle-arrow--MarginLeft |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__toggle-arrow--MarginRight |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle-arrow--with-clear--MarginLeft |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle-arrow--m-top--m-expanded__toggle-arrow--Rotate |
180deg
|
|
--pf-c-select--m-plain__toggle-arrow--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select--m-plain--hover__toggle-arrow--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__toggle-clear--PaddingRight |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle-clear--PaddingLeft |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__toggle-clear--toggle-button--PaddingLeft |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__toggle-button--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__menu--BackgroundColor |
var(--pf-global--BackgroundColor--light-100, #fff)
|
|
--pf-c-select__menu--BoxShadow |
var(--pf-global--BoxShadow--md, 0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06))
|
|
--pf-c-select__menu--PaddingTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu--PaddingBottom |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu--Top |
calc(100% + var(--pf-global--spacer--xs, 0.25rem))
|
|
--pf-c-select__menu--ZIndex |
var(--pf-global--ZIndex--sm, 200)
|
|
--pf-c-select__menu--Width |
auto
|
|
--pf-c-select__menu--MinWidth |
100%
|
|
--pf-c-select__menu--m-top--TranslateY |
calc(-100% - var(--pf-global--spacer--xs, 0.25rem))
|
|
--pf-c-select__list-item--m-loading--PaddingTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-item--PaddingTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-item--PaddingRight |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-item--m-selected--PaddingRight |
var(--pf-global--spacer--2xl, 3rem)
|
|
--pf-c-select__menu-item--PaddingBottom |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-item--PaddingLeft |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-item--FontSize |
var(--pf-global--FontSize--md, 1rem)
|
|
--pf-c-select__menu-item--FontWeight |
var(--pf-global--FontWeight--normal, 400)
|
|
--pf-c-select__menu-item--LineHeight |
var(--pf-global--LineHeight--md, 1.5)
|
|
--pf-c-select__menu-item--Color |
var(--pf-global--Color--dark-100, #151515)
|
|
--pf-c-select__menu-item--disabled--Color |
var(--pf-global--Color--dark-200, #6a6e73)
|
|
--pf-c-select__menu-item--Width |
100%
|
|
--pf-c-select__menu-item--hover--BackgroundColor |
var(--pf-global--BackgroundColor--light-300, #f0f0f0)
|
|
--pf-c-select__menu-item--focus--BackgroundColor |
var(--pf-global--BackgroundColor--light-300, #f0f0f0)
|
|
--pf-c-select__menu-item--disabled--BackgroundColor |
transparent
|
|
--pf-c-select__menu-item--m-link--Width |
auto
|
|
--pf-c-select__menu-item--m-link--hover--BackgroundColor |
transparent
|
|
--pf-c-select__menu-item--m-link--focus--BackgroundColor |
transparent
|
|
--pf-c-select__menu-item--m-action--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select__menu-item--m-action--hover--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__menu-item--m-action--focus--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__menu-item--m-action--disabled--Color |
var(--pf-global--disabled-color--200, #d2d2d2)
|
|
--pf-c-select__menu-item--m-action--Width |
auto
|
|
--pf-c-select__menu-item--m-action--FontSize |
var(--pf-global--icon--FontSize--sm, 0.625rem)
|
|
--pf-c-select__menu-item--m-action--hover--BackgroundColor |
transparent
|
|
--pf-c-select__menu-item--m-action--focus--BackgroundColor |
transparent
|
|
--pf-c-select__menu-item--hover__menu-item--m-action--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select__menu-item--m-favorite-action--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select__menu-item--m-favorite-action--hover--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__menu-item--m-favorite-action--focus--Color |
var(--pf-global--Color--100, #151515)
|
|
--pf-c-select__menu-wrapper--m-favorite__menu-item--m-favorite-action--Color |
var(--pf-global--palette--gold-400, #f0ab00)
|
|
--pf-c-select__menu-wrapper--m-favorite__menu-item--m-favorite-action--hover--Color |
var(--pf-global--palette--gold-500, #c58c00)
|
|
--pf-c-select__menu-wrapper--m-favorite__menu-item--m-favorite-action--focus--Color |
var(--pf-global--palette--gold-500, #c58c00)
|
|
--pf-c-select__menu-item--m-load--Color |
var(--pf-global--link--Color, #06c)
|
|
--pf-c-select__menu-item-icon--Color |
var(--pf-global--active-color--100, #06c)
|
|
--pf-c-select__menu-item-icon--FontSize |
var(--pf-global--icon--FontSize--sm, 0.625rem)
|
|
--pf-c-select__menu-item-icon--Right |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-item-icon--Top |
50%
|
|
--pf-c-select__menu-item-icon--TranslateY |
-50%
|
|
--pf-c-select__menu-item-action-icon--MinHeight |
calc(var(--pf-c-select__menu-item--FontSize) * var(--pf-c-select__menu-item--LineHeight))
|
|
--pf-c-select__menu-item--match--FontWeight |
var(--pf-global--FontWeight--bold, 700)
|
|
--pf-c-select__menu-search--PaddingTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-search--PaddingRight |
var(--pf-c-select__menu-item--PaddingRight)
|
|
--pf-c-select__menu-search--PaddingBottom |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-search--PaddingLeft |
var(--pf-c-select__menu-item--PaddingLeft)
|
|
--pf-c-select__menu-group--menu-group--PaddingTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-group-title--PaddingTop |
var(--pf-c-select__menu-item--PaddingTop)
|
|
--pf-c-select__menu-group-title--PaddingRight |
var(--pf-c-select__menu-item--PaddingRight)
|
|
--pf-c-select__menu-group-title--PaddingBottom |
var(--pf-c-select__menu-item--PaddingBottom)
|
|
--pf-c-select__menu-group-title--PaddingLeft |
var(--pf-c-select__menu-item--PaddingLeft)
|
|
--pf-c-select__menu-group-title--FontSize |
var(--pf-global--FontSize--xs, 0.75rem)
|
|
--pf-c-select__menu-group-title--FontWeight |
var(--pf-global--FontWeight--normal, 400)
|
|
--pf-c-select__menu-group-title--Color |
var(--pf-global--Color--dark-200, #6a6e73)
|
|
--pf-c-select__menu-item-count--MarginLeft |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-item-count--FontSize |
var(--pf-global--FontSize--sm, 0.875rem)
|
|
--pf-c-select__menu-item-count--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select__menu-item--disabled__menu-item-count--Color |
var(--pf-global--Color--dark-200, #6a6e73)
|
|
--pf-c-select__menu-item-description--FontSize |
var(--pf-global--FontSize--xs, 0.75rem)
|
|
--pf-c-select__menu-item-description--Color |
var(--pf-global--Color--200, #6a6e73)
|
|
--pf-c-select__menu-item-description--PaddingRight |
var(--pf-c-select__menu-item--PaddingRight)
|
|
--pf-c-select__menu-item-main--PaddingRight |
var(--pf-c-select__menu-item--PaddingRight)
|
|
--pf-c-select__menu-item--m-selected__menu-item-main--PaddingRight |
var(--pf-c-select__menu-item--m-selected--PaddingRight)
|
|
--pf-c-select__menu-footer--BoxShadow |
var(--pf-global--BoxShadow--sm-top, 0 -0.125rem 0.25rem -0.0625rem rgba(3, 3, 3, 0.16))
|
|
--pf-c-select__menu-footer--PaddingTop |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-footer--PaddingRight |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-footer--PaddingBottom |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-footer--PaddingLeft |
var(--pf-global--spacer--md, 1rem)
|
|
--pf-c-select__menu-footer--MarginTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select__menu-footer--MarginBottom |
calc(var(--pf-global--spacer--sm, 0.5rem) * -1)
|
|
--pf-c-select-menu--c-divider--MarginTop |
var(--pf-global--spacer--sm, 0.5rem)
|
|
--pf-c-select-menu--c-divider--MarginBottom |
var(--pf-global--spacer--sm, 0.5rem)
|
CSS Parts on pf-select
None
Slots on pf-option-group
- Default Slot
-
<pf-option>
or<hr>
elements -
label
-
Group label. Overrides the
label
attribute.
Attributes on pf-option-group
label
-
Group description. Overridden by
label
slot.- DOM Property
label
- Type
-
string | undefined
- Default
-
unknown
disabled
-
whether group is disabled
- DOM Property
disabled
- Type
-
boolean
- Default
-
false
Methods on pf-option-group
None
Events on pf-option-group
None
CSS Custom Properties on pf-option-group
None
CSS Parts on pf-option-group
None
Slots on pf-option
- Default Slot
-
option text
-
icon
-
optional icon
-
description
-
optional description
Attributes on pf-option
disabled
-
whether option is disabled
- DOM Property
disabled
- Type
-
boolean
- Default
-
false
value
-
form value for this option
- DOM Property
value
- Type
-
unknown
- Default
-
unknown
selected
-
whether option is selected
- DOM Property
selected
- Type
-
boolean
- Default
-
false
active
-
whether option is active descendant
- DOM Property
active
- Type
-
boolean
- Default
-
false
description
-
Optional option description; overridden by description slot.
- DOM Property
description
- Type
-
string
- Default
-
''
Methods on pf-option
None
Events on pf-option
None
CSS Custom Properties on pf-option
None
CSS Parts on pf-option
None