Skip to content
Mosaic
On this page

Panel

A page of content with a title and its sections. Panel.Sections sit one heading level below Panel.Title. usePanelTitle returns a getter for the title element, to move focus to it.

Use for

  • a page of settings with a title and sections
  • a page inside a Profile
  • focusing the page title after navigation, with usePanelTitle

Practices

GuidancePractice
DoPut each Section inside Panel.Sections, so its heading is one level below the title.
Don’tExpect Panel.Title to render inside a Profile.ContentPanel. The profile renders the page title there, and the title ref reaches that heading instead.

API reference

Panel.Root

A div that holds the title ref for usePanelTitle.

Slot: cl-panel

Panel.Title

A focusable div (tabIndex={-1}) around a 2xl Heading at the current level.

Slot: cl-panel-title

Panel.Sections

A div that sets the heading level one deeper for its children.

Slot: cl-panel-sections

Examples

A page

TSX
<Panel.Root>
  <Panel.Title>Account</Panel.Title>
  <Panel.Sections>
    <Section.Root>…</Section.Root>
  </Panel.Sections>
</Panel.Root>