Skip to Content
NarakUI

Section Header

A title, subtitle, and actions row for a page section, with Section for consistent spacing.

Section with header

SectionHeader puts the title, an optional badge and info tooltip, and the subtitle on the left and its children on the right. Wrap it and the content below in Section for consistent vertical spacing.

Citation opportunities

Beta
Sites that cite your competitors but not your brand.
  • g2.comCites 4 competitors
  • capterra.comCites 3 competitors
  • zapier.com/blogCites 2 competitors

Loading

isTitleLoading and isSubtitleLoading swap the text for skeletons while it loads.

Installation

pnpm dlx shadcn@latest add @narakui/section-header

Add "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/section-header.json.

Usage

import { Section, SectionHeader } from '@/components/ui/section-header';

<Section>
  <SectionHeader
    title="Citation opportunities"
    subtitle="Sites that cite your competitors but not your brand."
    tooltipContent="Updated daily from your tracked prompts"
  >
    <Button size="small" iconStart="download">
      Export
    </Button>
  </SectionHeader>
  {/* Section body */}
</Section>

SectionHeader Properties

PropTypeDefaultDescription
title (Required)string—Section title
subtitlestring—Supporting text below the title
childrenReactNode—Actions aligned to the right
badgeReactNode—Content shown next to the title
tooltipContentReactNode—Shows an info icon with this tooltip next to the title
titleTooltipReactNode—Underlines the title and shows this tooltip on it
isTitleLoadingbooleanfalseReplaces the title with a skeleton
isSubtitleLoadingbooleanfalseReplaces the subtitle with a skeleton. Has no effect without a subtitle
idstring—Anchor id for linking to the section
classNamestring—Additional classes for the header row
childrenClassNamestring—Additional classes for the actions wrapper
subtitleClassNamestring—Additional classes for the subtitle
tooltipIconClassNamestring—Additional classes for the info icon shown by tooltipContent

Section Properties

PropTypeDefaultDescription
children (Required)ReactNode—Section content
spacingbooleantrueAdds vertical spacing between children
classNamestring—Additional classes for the section