All components

Section Heading

A component that standardizes heading typography and spacing. This component includes a pre-heading label, main heading, and body text in different layout variants.

React
Figma
Open in New Tab

components/shadcncraft/pro-marketing/section-heading.tsx

import * as React from "react";

import { cn } from "@/lib/utils";
import { Tagline } from "@/components/shadcncraft/pro-marketing/tagline";

function SectionHeading({
  alignment = "left",
  className,
  ...props
}: React.ComponentProps<"div"> & { alignment?: "left" | "center" }) {
  return (
    <div
      data-slot="section-heading"
      data-alignment={alignment}
      className={cn(
        "group/section-heading flex max-w-3xl flex-col gap-3",
        alignment === "left" && "items-start text-left",
        alignment === "center" && "mx-auto items-center text-center",
        className
      )}
      {...props}
    />
  );
}

function SectionHeadingTagline({ ...props }: React.ComponentProps<typeof Tagline>) {
  return <Tagline variant="default" {...props} />;
}

type HeadingTypes = "h2" | "h3" | "h4" | "h5" | "h6";
type HeadingProps<T extends HeadingTypes> = React.ComponentProps<T> & {
  as?: T;
};

function SectionHeadingTitle<T extends HeadingTypes = "h2">({
  as,
  className,
  ...props
}: HeadingProps<T>) {
  const Comp = as ?? "h2";

  return (
    <Comp
      data-slot="section-heading-title"
      className={cn(
        "scroll-m-20 text-4xl font-medium tracking-tight text-balance text-foreground lg:text-5xl",
        className
      )}
      {...props}
    />
  );
}

function SectionHeadingBody({ className, ...props }: React.ComponentProps<"p">) {
  return (
    <p
      data-slot="section-heading-body"
      className={cn(
        "max-w-2xl text-base font-normal text-pretty text-muted-foreground",
        className
      )}
      {...props}
    />
  );
}

function SectionHeadingActions({ className, ...props }: React.ComponentProps<"div">) {
  return (
    <div
      data-slot="section-heading-actions"
      className={cn("flex w-full flex-col gap-2 sm:w-fit sm:flex-row", className)}
      {...props}
    />
  );
}

export {
  SectionHeading,
  SectionHeadingActions,
  SectionHeadingBody,
  SectionHeadingTagline,
  SectionHeadingTitle,
};
SBIOTJ

Join 3,000+ builders shipping with shadcncraft

Get access to this component and the full library

Production-ready blocks and components with matching Figma and React.

Get this componentFree
Benefits

Built for real interfaces

Each block is designed to work as part of a complete page, not just as a visual fragment.

Structured Layouts

Clear grids, consistent spacing, and predictable hierarchy.

Marketing + App Coverage

Landing pages, dashboards, onboarding, pricing, e-commerce, and more.

Theme Compatible

Works seamlessly with semantic tokens and theming.

Production-Ready States

Designed with real content, tokenized spacing, and real interaction patterns.

Figma + React Parity (Pro + React)

Design in Figma and ship with aligned React components.

Composable by Design

Mix blocks together to create complete pages without layout conflicts.

Frequently Asked Questions

Quick FAQs to get you started.
Still have questions? See all FAQs, or get support.

Yes. They follow shadcn/ui structure and are built for real products.

Real support from the team behind shadcncraft

Get help within 24 hours from the people who build and maintain the system.

Email
Prefer a direct line? Send us a message and we'll get back to you as soon as possible.
Discord
Get quick support, share feedback, or connect with other builders.
Feedback
Got something to say about anything shadcncraft? We'd love to hear it.