Section

A layout component for organizing page content into sections.

Use SectionTitle and SectionDescription for consistent section headings and supporting copy. Both forward HTML attributes; SectionTitle also accepts as to select the heading level.

---
import {
  Section,
  SectionContainer,
  SectionDescription,
  SectionTitle,
} from "@/components/ui/section"
---

<Section id="services">
  <SectionContainer>
    <SectionTitle>Services</SectionTitle>
    <SectionDescription>How we can help.</SectionDescription>
  </SectionContainer>
</Section>

For full page examples, browse the block examples.

Installation

npx shadcn@latest add @fulldev/section

Usage

import { Section, SectionContainer } from "@/components/ui/section"
<Section>
  <SectionContainer>
    <h2 class="text-2xl font-semibold">Release notes</h2>
    <p>Use the container for the section content you want aligned.</p>
  </SectionContainer>
</Section>

Examples

Notes

  • Section controls spacing and surface treatment.
  • SectionContainer keeps the inner width and horizontal padding consistent.
  • Use class on Section when a specific page needs custom vertical spacing.

API Reference

See the GitHub source code for more information on props.