Footer
On this page
Importing
Add rh-footer to your page with this import statement:
<script type="module">
import '@rhds/elements/rh-footer/rh-footer.js';
</script>
Copy to Clipboard
Copied!
Wrap lines
Overflow lines
To learn more about installing RHDS elements on your site using an import map read our getting started docs.
Lightdom CSS
This element requires you to load "Lightdom CSS" stylesheets for styling deeply slotted elements.
Note
Replace /path/to/
with path to the CSS file, whether local or CDN.
<link rel="stylesheet" href="/path/to/rh-footer/rh-footer-lightdom.css">
Usage
rh-footer
A footer displays secondary content and legal information to users who reach the bottom of a page.
Slot Name | Summary | Description |
---|---|---|
heading |
text that describes the footer section to assistive technology. Contains default text "Red Hat footer". |
|
base |
Overrides everything. Do not use. |
|
header |
Overrides |
|
header-primary |
primary footer header content, e.g. main logo. Overrides |
|
logo |
main page or product logo. Defaults to Red Hat corporate logo |
|
header-secondary |
secondary footer header content, e.g. social links. Overrides |
|
social-links |
social media links (icons). Contains a default set of links |
|
main |
main footer content. Overrides |
|
main-primary |
main footer region. typically a columnar grid |
|
main-secondary |
typically contains prose or promotional content |
|
universal |
must contain |
Method Name | Description |
---|---|
updateAccessibility() |
Get any |
Part Name | Summary | Description |
---|---|---|
base |
main footer element, containing all footer content |
|
header |
footer header, typically containing main logo and social links |
|
header-primary |
primary footer header content, e.g. main logo |
|
logo |
main page or product logo container |
|
header-secondary |
secondary footer header content, e.g. social links |
|
social-links |
social links container |
|
section |
main content container. |
|
main |
main content container. |
|
main-primary |
container for main footer links |
|
links |
container for main footer links |
|
main-secondary |
container for prose or promotional content |
CSS Property | Description | Default |
---|---|---|
--rh-footer-nojs-min-height |
750px
|
|
--rh-footer-icon-color |
var(--rh-color-gray-40, #a3a3a3)
|
|
--rh-footer-icon-color-hover |
var(--rh-color-gray-30, #c7c7c7)
|
|
--rh-footer-border-color |
var(--rh-color-border-subtle-on-dark, #707070)
|
|
--rh-footer-accent-color |
var(--rh-color-accent-brand-on-light, #ee0000)
|
|
--rh-footer-section-side-gap |
var(--rh-space-lg, 16px)
|
|
--pf-global--spacer--xl |
32px
|
|
--rh-footer-links-gap |
var(--rh-space-lg, 16px)
|
|
--rh-footer-link-header-font-size |
var(--rh-font-size-body-text-sm, 0.875rem)
|
Token | Copy |
---|---|
--rh-font-family-body-text
|
|
--rh-line-height-body-text
|
|
--rh-color-gray-40
|
|
--rh-color-gray-30
|
|
--rh-color-border-subtle-on-dark
|
|
--rh-color-accent-brand-on-light
|
|
--rh-color-white
|
|
--rh-size-icon-04
|
|
--rh-font-weight-body-text-regular
|
|
--rh-font-family-heading
|
|
--rh-line-height-heading
|
|
--rh-length-xl
|
|
--rh-length-3xs
|
|
--rh-space-xs
|
|
--rh-font-family-code
|
|
--rh-font-size-code-xs
|
|
--rh-length-4xs
|
|
--rh-color-surface-darker
|
|
--rh-color-surface-darkest
|
|
--rh-color-text-secondary
|
|
--rh-space-md
|
|
--rh-font-size-body-text-xs
|
|
--rh-space-xl
|
|
--rh-font-size-body-text-lg
|
|
--rh-space-lg
|
|
--rh-font-weight-heading-medium
|
|
--rh-font-size-body-text-sm
|
|
--rh-color-text-primary
|
|
--rh-space-2xl
|
|
--rh-space-4xl
|
|
rh-footer-block
Slot Name | Summary | Description |
---|---|---|
header |
||
|
Part Name | Summary | Description |
---|---|---|
base |
||
header |
||
content |
Token | Copy |
---|---|
--rh-space-2xl
|
|
--rh-font-weight-heading-medium
|
|
--rh-font-size-body-text-sm
|
|
--rh-space-lg
|
|
--rh-color-text-primary-on-dark
|
|
--rh-color-text-secondary-on-dark
|
|
--rh-font-family-body-text
|
|
--rh-font-weight-body-text-regular
|
|
rh-footer-copyright
Slot Name | Summary | Description |
---|---|---|
|
rh-footer-links
Slot Name | Summary | Description |
---|---|---|
header |
||
panel |
||
|
Attribute | DOM Property | Description | Type | Default |
---|---|---|---|---|
header-hidden |
headerHidden |
Cause the header slot to be visually hidden.
Setting this to true will not affect |
|
|
Method Name | Description |
---|---|
updateAccessibility() |
Part Name | Summary | Description |
---|---|---|
header |
||
default |
rh-footer-social-link
Social media links for Red Hat Footer
Slot Name | Summary | Description |
---|---|---|
|
Optional icon for social link. Use only when suitable icon is unavailable with |
Attribute | DOM Property | Description | Type | Default |
---|---|---|---|---|
icon |
icon |
Icon for this social link e.g. |
|
|
href |
href |
Social link address |
|
|
accessible-label |
accessibleLabel |
Textual label for the social link e.g. "Instagram" |
|
|
CSS Property | Description | Default |
---|---|---|
--rh-footer--social-icon--size |
var(--rh-size-icon-02, 24px)
|
Token | Copy |
---|---|
--rh-size-icon-02
|
|
rh-footer-universal
Slot Name | Summary | Description |
---|---|---|
heading |
text that describes the footer section to assistive tecchnology. Contains default text "Red Hat footer". |
|
base |
||
logo |
logo |
|
primary |
primary |
|
primary-start |
primary-start |
|
links-primary |
links-primary |
|
primary-end |
primary-end |
|
secondary |
secondary |
|
secondary-start |
secondary-start |
|
links-secondary |
links-secondary |
|
secondary-end |
secondary-end |
|
tertiary |
tertiary |
Attribute | DOM Property | Description | Type | Default |
---|---|---|---|---|
color-palette |
colorPalette |
|
|
Part Name | Summary | Description |
---|---|---|
section |
base |
|
base |
base |
|
logo |
logo |
|
logo-anchor |
||
logo-image |
logo-image |
|
primary |
primary |
|
primary-start |
primary-start |
|
links-primary |
links-primary |
|
primary-end |
primary-end |
|
spacer |
||
secondary |
secondary |
|
secondary-start |
secondary-start |
|
links-secondary |
links-secondary |
|
secondary-end |
secondary-end |
|
tertiary |
tertiary |
CSS Property | Description | Default |
---|---|---|
--rh-footer-nojs-min-height |
750px
|
|
--rh-footer-icon-color |
var(--rh-color-gray-40, #a3a3a3)
|
|
--rh-footer-icon-color-hover |
var(--rh-color-gray-30, #c7c7c7)
|
|
--rh-footer-border-color |
var(--rh-color-border-subtle-on-dark, #707070)
|
|
--rh-footer-accent-color |
var(--rh-color-accent-brand-on-light, #ee0000)
|
|
--rh-footer-section-side-gap |
var(--rh-space-lg, 16px)
|
|
--pf-global--spacer--xl |
32px
|
|
--rh-footer-links-gap |
var(--rh-space-lg, 16px)
|
|
--rh-footer-link-header-font-size |
var(--rh-font-size-body-text-sm, 0.875rem)
|
Token | Copy |
---|---|
--rh-font-family-body-text
|
|
--rh-line-height-body-text
|
|
--rh-color-gray-40
|
|
--rh-color-gray-30
|
|
--rh-color-border-subtle-on-dark
|
|
--rh-color-accent-brand-on-light
|
|
--rh-color-white
|
|
--rh-size-icon-04
|
|
--rh-font-weight-body-text-regular
|
|
--rh-font-family-heading
|
|
--rh-line-height-heading
|
|
--rh-length-xl
|
|
--rh-length-3xs
|
|
--rh-space-xs
|
|
--rh-font-family-code
|
|
--rh-font-size-code-xs
|
|
--rh-length-4xs
|
|
--rh-color-surface-darker
|
|
--rh-color-surface-darkest
|
|
--rh-color-text-secondary
|
|
--rh-space-md
|
|
--rh-font-size-body-text-xs
|
|
--rh-space-xl
|
|
--rh-font-size-body-text-lg
|
|
--rh-space-lg
|
|
--rh-font-weight-heading-medium
|
|
--rh-font-size-body-text-sm
|
|
--rh-color-text-primary
|
|
--rh-space-2xl
|
|
--rh-space-4xl
|
|
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.