Examples
Default Sizes
h1 defaults to 2xl
h2 defaults to xl
h3 defaults to lg
h4 defaults to md
h5 defaults to md
h6 defaults to md
Props
Title
Name | Type | Default | Description |
---|---|---|---|
headingLevelrequired | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | The heading level to use | |
children | React.ReactNode | '' | Content rendered inside the Title |
className | string | '' | Additional classes added to the Title |
ouiaId | number | string | Value to overwrite the randomly generated data-ouia-component-id. | |
ouiaSafe | boolean | true | Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. |
size | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | headingLevelSizeMap[HeadingLevel] | The size of the Title |
CSS variables
Expand or collapse column | Selector | Variable | Value | |
---|---|---|---|---|
.pf-v5-c-title | --pf-v5-c-title--FontFamily | '"RedHatDisplay", helvetica, arial, sans-serif' | ||
--pf-v5-c-title--FontFamily --pf-v5-global--FontFamily--heading $pf-v5-global--FontFamily--heading '"RedHatDisplay", helvetica, arial, sans-serif' | ||||
.pf-v5-c-title | --pf-v5-c-title--m-4xl--LineHeight | 1.3 | ||
--pf-v5-c-title--m-4xl--LineHeight --pf-v5-global--LineHeight--sm $pf-v5-global--LineHeight--sm 1.3 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-4xl--FontSize | 2.25rem | ||
--pf-v5-c-title--m-4xl--FontSize --pf-v5-global--FontSize--4xl $pf-v5-global--FontSize--4xl pf-font-prem(36px) 2.25rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-4xl--FontWeight | 400 | ||
--pf-v5-c-title--m-4xl--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-3xl--LineHeight | 1.3 | ||
--pf-v5-c-title--m-3xl--LineHeight --pf-v5-global--LineHeight--sm $pf-v5-global--LineHeight--sm 1.3 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-3xl--FontSize | 1.75rem | ||
--pf-v5-c-title--m-3xl--FontSize --pf-v5-global--FontSize--3xl $pf-v5-global--FontSize--3xl pf-font-prem(28px) 1.75rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-3xl--FontWeight | 400 | ||
--pf-v5-c-title--m-3xl--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-2xl--LineHeight | 1.3 | ||
--pf-v5-c-title--m-2xl--LineHeight --pf-v5-global--LineHeight--sm $pf-v5-global--LineHeight--sm 1.3 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-2xl--FontSize | 1.5rem | ||
--pf-v5-c-title--m-2xl--FontSize --pf-v5-global--FontSize--2xl $pf-v5-global--FontSize--2xl pf-font-prem(24px) 1.5rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-2xl--FontWeight | 400 | ||
--pf-v5-c-title--m-2xl--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-xl--LineHeight | 1.5 | ||
--pf-v5-c-title--m-xl--LineHeight --pf-v5-global--LineHeight--md $pf-v5-global--LineHeight--md 1.5 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-xl--FontSize | 1.25rem | ||
--pf-v5-c-title--m-xl--FontSize --pf-v5-global--FontSize--xl $pf-v5-global--FontSize--xl pf-font-prem(20px) 1.25rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-xl--FontWeight | 400 | ||
--pf-v5-c-title--m-xl--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-lg--LineHeight | 1.5 | ||
--pf-v5-c-title--m-lg--LineHeight --pf-v5-global--LineHeight--md $pf-v5-global--LineHeight--md 1.5 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-lg--FontSize | 1.125rem | ||
--pf-v5-c-title--m-lg--FontSize --pf-v5-global--FontSize--lg $pf-v5-global--FontSize--lg pf-font-prem(18px) 1.125rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-lg--FontWeight | 400 | ||
--pf-v5-c-title--m-lg--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-md--LineHeight | 1.5 | ||
--pf-v5-c-title--m-md--LineHeight --pf-v5-global--LineHeight--md $pf-v5-global--LineHeight--md 1.5 | ||||
.pf-v5-c-title | --pf-v5-c-title--m-md--FontSize | 1rem | ||
--pf-v5-c-title--m-md--FontSize --pf-v5-global--FontSize--md $pf-v5-global--FontSize--md pf-font-prem(16px) 1rem | ||||
.pf-v5-c-title | --pf-v5-c-title--m-md--FontWeight | 400 | ||
--pf-v5-c-title--m-md--FontWeight --pf-v5-global--FontWeight--normal $pf-v5-global--FontWeight--normal 400 |
View source on GitHub