Skip to content
Mosaic
On this page

Profile

A surface you navigate: a column of pages beside the page each one opens, as tabs. When narrow, the nav becomes a select on the page title, then a sheet on a phone. Inside a Dialog it adds the close control.

Use for

  • a user or organization profile with several pages
  • a settings surface with side navigation
  • a tabbed page layout that collapses on small screens

Practices

GuidancePractice
DoRender a Profile.Title. It names the nav, and stays visually hidden.
DoGive each Profile.NavItem a value that matches a Profile.ContentPanel, and pass the selected page name as pageTitle.
DoPass a string as a Profile.NavItem child, so it names the option when the nav is a select.
Don’tRender a Panel.Title inside Profile.ContentPanel and expect it to show. Profile.Content renders the page title.

API reference

Profile.Root

Holds the selected page and the nav layout. Renders a div, or the render element.

Slot: cl-profile

PropTypeDescription
valuestringThe selected page.
onValueChange(value: string) => voidCalled with the page the user picks.
orientationTabsProps['orientation']Tab arrow-key direction.Default: 'vertical'
activationModeTabsProps['activationMode']Whether focusing a tab selects it. The sheet nav always uses manual.
renderBrandingbooleanShows Clerk branding in the wide layout.Default: true
elevationProfileElevationcard draws a card. flush sits inline in the page; inside a Dialog it stays card.Default: 'card'

Profile.Title

A visually hidden heading at the current level that names the profile and its nav.

Slot: cl-profile-title

Profile.Nav

A nav of Profile.NavItems or Profile.NavGroups. Renders as a tablist, the options of the page title select, or a tablist in a sheet.

Slot: cl-profile-nav

Profile.NavGroup

A labelled run of nav items. As tabs the label describes each item; as options it names the group.

Slot: cl-profile-nav-group

PropTypeDescription
labelReact.ReactNodeThe group name, shown above its items.

Profile.NavItem

One page in the nav, as a tab or an option.

Slot: cl-profile-nav-item

PropTypeDescription
valuestringThe page it opens.
iconReact.ReactNodeA leading icon, hidden from assistive tech.
badgeReact.ReactNodeA trailing Badge. Badges in it default to neutral.
disabledbooleanDisables the item.

Profile.Content

The scrolling page area. Renders the page title, then its children.

Slot: cl-profile-content

PropTypeDescription
pageTitleReact.ReactNodeThe selected page name, shown as the page title.

Profile.ContentPanel

One page, shown while its value is selected. Sets the heading level one below the page title.

Slot: cl-profile-content-panel

PropTypeDescription
valuestringThe page it shows for. Matches a Profile.NavItem value.

Examples

A two-page profile

TSX
<Profile.Root value={page} onValueChange={setPage}>
  <Profile.Title>User profile</Profile.Title>
  <Profile.Nav>
    <Profile.NavItem value='account'>Account</Profile.NavItem>
    <Profile.NavItem value='security'>Security</Profile.NavItem>
  </Profile.Nav>
  <Profile.Content pageTitle={titles[page]}>
    <Profile.ContentPanel value='account'>…</Profile.ContentPanel>
    <Profile.ContentPanel value='security'>…</Profile.ContentPanel>
  </Profile.Content>
</Profile.Root>