Skip to content

CdsFooter

The footer of the application: a copyright notice and utility links on regular pages, an action bar on forms. The layout measures the height of the footer and reserves the space, so it never covers the last line of the content.

Storybook GitLab
Test coverage: 97% — good coverage
API in specs
12 / 12 props, events, slots and exposed members with a test
Test cases
21 unit · 0 browser
Known bugs
1 pinned by an it.fails test
Code coverage
96.7% lines · 85.7% branches measured in v4.0.0-alpha.13
A11y (axe)
6 recommendations in 6 stories measured in v4.0.0-alpha.11

The footer works only inside CdsLayout — outside the layout it renders nothing and warns about it in the console. The top bar of the application is built by CdsHeader, and the content of both by CdsToolbar.

Variations ​

Separator ​

The footer is pinned to the bottom edge and overlaps the content, so its border is worth marking: bordered draws a line, elevated casts a shadow upwards. The shadow matters more when a long list continues under the footer.

Color ​

The bg-color prop paints the background of the footer with a palette alias, color paints the text and the icons inside. If only the background is set, the text color is picked to be contrasting automatically.

Floating mode ​

The reveal prop hides the footer when scrolling down and brings it back when scrolling up. The @reveal event reports the change of visibility — to adjust a selection counter, for example.

Visibility ​

The model-value prop removes the footer entirely: the layout stops reserving space for it, and the content takes the full height. This is how you hide an action bar until the form has changed.

Guidelines ​

Scenarios ​

The copyright on the left, the utility links on the right — the familiar layout people look for at the bottom of a page. The height comes from the content, and height tells the layout the expected value before the first measurement.

Form action bar ​

On a long form the "Cancel" and "Publish" buttons live in the footer: they are visible at any scroll position and need no reaching for. CdsToolbarTitle stretches and pushes the buttons to the right edge, and elevated separates the bar from the fields.

API ​

Props

NameTypeDefaultDescription
bgColorstring | undefined—Background color of the component
borderedboolean | undefinedfalseShows the border.
colorstring | undefined—Component color
elevatedboolean | undefinedfalseShows the shadow.
heightstring | number | undefined50Height of the element.
modelValueboolean | undefinedtrueVisibility of the element in the layout.
revealboolean | undefinedfalseFloating mode: the element appears/hides on scroll.
revealOffsetnumber | undefined250Scroll threshold (px) up to which the floating element stays visible.
themestring | undefined—Component theme

Events

NameTypeDescription
focusin[event: FocusEvent]Focus moved inside the footer.
reveal[value: boolean]Visibility of the floating footer has changed.

Slots

NameTypeDescription
defaultanyContent of the footer (CdsToolbar and others).