Skip to content

SettingsPage ​

SettingsPage is the frame of a settings page: the trail, the title, the tabs and the sections.

When to use ​

Use it for pages where people read and change settings. Pass the trail to the page in crumbs, and the pages of the settings in tabs with the current one; put Sections in the children. Any other page is a Page.

Props ​

PropDefaultDescription
titlerequiredThe title of the page
crumbs[]The trail to the page, { label, href?, onclick? }[]
crumbsLabelThe name of the trail
tabsThe tabs, { id, label, href? }[]
currentThe id of the current tab
tabsLabelThe name of the tabs
onselectCalled with the id of the tab that is opened
titleEndA borderless icon button beside the title (a snippet)
childrenrequiredThe sections

Contract ​

A Page of the settings width, with a PageHeader as its head: the Crumbs, then the title. With tabs, the page is flush and the text of the tabs is pad-lg below the title; the first section is gap-lg below the tabs' line. Without tabs, the first section is pad-lg below the title. The sections are stacked with gap 0; each brings its own distance and line. Below 48rem the margin at the sides is gap-md.

Example ​

SettingsPage

Released under the Apache-2.0 license.