Skip to content
View as Markdown

SidebarSection ​

SidebarSection places a static heading above a run of flat navigation items. Unlike SidebarGroup, a section is neither collapsible nor navigable, and its items keep the same styling and indentation as top-level items.

Import ​

tsx
import { SidebarSection } from "@tailor-platform/app-shell";

Basic Usage ​

tsx
import {
  DefaultSidebar,
  SidebarItem,
  SidebarSection,
  SidebarSeparator,
} from "@tailor-platform/app-shell";

<DefaultSidebar>
  <SidebarItem to="/overview" />

  <SidebarSeparator />

  <SidebarSection title="Services">
    <SidebarItem to="/ai-gateways" />
    <SidebarItem to="/applications" />
    <SidebarItem to="/auth-connections" />
  </SidebarSection>

  <SidebarSeparator />

  <SidebarSection title="Logs">
    <SidebarItem to="/activity-logs" />
    <SidebarItem to="/dataplane-logs" />
  </SidebarSection>
</DefaultSidebar>;

Props ​

PropTypeDefaultDescription
titlestring | LocalizedStringRequiredSection heading (supports i18n)
childrenReact.ReactNodeRequiredChild items (usually SidebarItem)

Behavior ​

  • Not interactive. The heading is plain text: it is not a link and has no expand/collapse toggle.
  • Flat items. Children render at the same level as top-level SidebarItems, not as an indented submenu.
  • Icon rail. When the sidebar collapses to an icon rail, the heading is hidden and the items stay in the rail as ordinary icons. Unlike SidebarGroup, there is no hover flyout.
  • No automatic dividers. Add a SidebarSeparator between sections where you want a line.

Internationalization ​

Titles support i18n with defineI18nLabels:

tsx
import { defineI18nLabels } from "@tailor-platform/app-shell";

const labels = defineI18nLabels({
  en: { services: "Services" },
  ja: { services: "サービス" },
});

<SidebarSection title={labels.t("services")}>
  <SidebarItem to="/ai-gateways" />
</SidebarSection>;

When to Use ​

Use SidebarSection when:

  • You want to label a run of items with a heading, but keep them always visible
  • The items are peers of your top-level items, not children of a parent page
  • You want the items to stay as individual icons in the icon rail

Use SidebarGroup when:

  • Users should be able to collapse the items
  • The items belong under a parent with its own icon (or landing page via to)
  • You need nesting
FeatureSidebarSectionSidebarGroup
Collapsible❌ No✅ Yes
Heading is link❌ NoOptional (to prop)
Icon❌ NoOptional
Child stylingSame as top levelIndented submenu
Icon railHeading hiddenGroup icon opens a flyout
NestingNot intendedCan contain groups

Accessibility ​

The children are rendered as their own list, labelled by the heading, so screen readers announce the section name (for example, "Services, list, 3 items") when entering it.