Zum Inhalt springen
CtrlK

ArdoSidebarSection

Auf dieser Seite
Diese API-Referenz wird aus den englischen TypeScript-Quellkommentaren erzeugt. Namen, Signaturen und Beispiele entsprechen dem veröffentlichten Paket.

Marker component for declaring one section tab and panel inside ArdoSidebar.

ArdoSidebar reads this element's props before React renders it. When used outside ArdoSidebar, it only renders its children.

import { ArdoSidebarSection } from "ardo/ui"

<ArdoSidebarSection id={…} label={…} to={…}>{children}</ArdoSidebarSection>

Props

NameTypeRequiredDescription
idstringYesStable section id, usually matching a top-level route segment.
labelstringYesVisible tab label.
toRoutePathYesLanding route for the section tab.
iconReactNodeNoTab icon. Defaults to the catalog icon for known section ids such as
guide, api or adr; other ids get a text-only tab. Pass null to
drop the icon.
match((pathname: string) => boolean) | RegExp | stringNoOptional active-route override. Defaults to matching the first segment of to.
childrenReactNodeNoSidebar content for this section.

Props type: ArdoSidebarSectionProps