Examples
Props
Accordion
Name | Type | Default | Description |
---|---|---|---|
aria-label | string | Adds accessible text to the Accordion | |
asDefinitionList | boolean | true | Flag to indicate whether use definition list or div |
children | React.ReactNode | null | Content rendered inside the Accordion |
className | string | '' | Additional classes added to the Accordion |
displaySize | 'default' | 'lg' | 'default' | Display size variant. |
headingLevel | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'h3' | Heading level to use |
isBordered | boolean | false | Flag to indicate the accordion had a border |
togglePosition | 'start' | 'end' | 'end' | Sets the toggle icon position for all accordion toggles. |
AccordionItem
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | null | Content rendered inside the accordion item. |
className | string | Additional classes added to the accordion item. | |
isExpanded | boolean | false | Flag to indicate whether the accordion item is expanded. |
AccordionContent
Name | Type | Default | Description |
---|---|---|---|
aria-label | string | '' | Adds accessible text to the Accordion content |
aria-labelledby | string | Id of the controlling accordion toggle to label the content. | |
children | React.ReactNode | null | Content rendered inside the Accordion |
className | string | '' | Additional classes added to the Accordion content |
component | React.ElementType | Component to use as content container | |
contentBodyProps | AccordionExpandableContentBodyProps | Props passed to the AccordionExpandableContentBody * | |
id | string | '' | Identify the AccordionContent item |
isCustomContent | React.ReactNode | false | Flag indicating content is custom. Expanded content Body wrapper will be removed from children. This allows multiple bodies to be rendered as content. |
isFixed | boolean | false | Flag to indicate Accordion content is fixed |
AccordionToggle
Name | Type | Default | Description |
---|---|---|---|
idrequired | string | Identify the Accordion toggle number | |
children | React.ReactNode | null | Content rendered inside the Accordion toggle |
className | string | '' | Additional classes added to the Accordion Toggle |
component | React.ElementType | Container to override the default for toggle |
AccordionExpandableContentBody
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | null | Content rendered inside the accordion content body |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v6-c-accordion | --pf-v6-c-accordion--BackgroundColor | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--RowGap | 0.25rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__item--BorderRadius | 6px | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__item--m-expanded--BackgroundColor | (In light theme) rgba(199, 199, 199, 0.2500) | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--ColumnGap | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--PaddingBlockStart | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--PaddingInlineEnd | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--m-expanded--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--PaddingInlineStart | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--BackgroundColor | (In light theme) rgba(255, 255, 255, 0.0000) | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--hover--BackgroundColor | (In light theme) rgba(199, 199, 199, 0.2500) | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--BorderRadius | 6px | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-toggle-start__toggle--ColumnGap | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle-text--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle-text--FontWeight | 400 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--m-expanded__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--m-expanded__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle-icon--Transition | .2s ease-in 0s | ||
.pf-v6-c-accordion | --pf-v6-c-accordion__toggle--m-expanded__toggle-icon--Rotate | 90deg | ||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--MarginInlineEnd | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--MarginBlockEnd | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--MarginInlineStart | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--BackgroundColor | (In light theme) #ffffff | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--BorderRadius | 6px | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--FontSize | 0.875rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content--m-fixed--MaxHeight | 9.375rem | ||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content-body--PaddingBlockStart | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content-body--PaddingInlineEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content-body--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content-body--PaddingInlineStart | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__expandable-content-body--expandable-content-body--PaddingBlockStart | 0 | ||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--PaddingBlockStart | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--PaddingInlineEnd | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--PaddingBlockEnd | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--m-expanded--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--PaddingInlineStart | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--FontFamily | "Red Hat Display", "RedHatDisplay", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle--FontSize | 1.125rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__expandable-content--FontSize | 1rem | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-display-lg__expandable-content--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion--m-bordered--RowGap | 0 | ||
.pf-v6-c-accordion | --pf-v6-c-accordion__item--m-bordered--BorderBlockEndWidth | 1px | ||
| ||||
.pf-v6-c-accordion | --pf-v6-c-accordion__item--m-bordered--BorderBlockEndColor | (In light theme) #c7c7c7 | ||
| ||||
.pf-v6-c-accordion.pf-m-toggle-start | --pf-v6-c-accordion__toggle--ColumnGap | 0.5rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--PaddingBlockStart | 1rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--PaddingInlineEnd | 1rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--PaddingBlockEnd | 1rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--m-expanded--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--PaddingInlineStart | 1rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--FontFamily | "Red Hat Display", "RedHatDisplay", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--FontSize | 1.125rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__toggle--m-expanded__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__expandable-content--FontSize | 1rem | ||
| ||||
.pf-v6-c-accordion.pf-m-display-lg | --pf-v6-c-accordion__expandable-content--Color | (In light theme) #151515 | ||
| ||||
.pf-v6-c-accordion.pf-m-bordered | --pf-v6-c-accordion--RowGap | 0 | ||
| ||||
.pf-v6-c-accordion.pf-m-bordered | --pf-v6-c-accordion__item--BorderRadius | 0 | ||
.pf-v6-c-accordion.pf-m-bordered | --pf-v6-c-accordion__toggle--BorderRadius | 0 | ||
.pf-v6-c-accordion__item.pf-m-expanded | --pf-v6-c-accordion__toggle--PaddingBlockEnd | 0.5rem | ||
| ||||
.pf-v6-c-accordion__item.pf-m-expanded | --pf-v6-c-accordion__toggle-text--FontWeight | 500 | ||
| ||||
.pf-v6-c-accordion__toggle:is(:hover, :focus) | --pf-v6-c-accordion__toggle--BackgroundColor | (In light theme) rgba(199, 199, 199, 0.2500) | ||
| ||||
.pf-v6-c-accordion__expandable-content-body + .pf-v6-c-accordion__expandable-content-body | --pf-v6-c-accordion__expandable-content-body--PaddingBlockStart | 0 | ||
|