Registry
Section
A full-bleed divider slide on the primary color.
---
layout: section
title: Numbers
---
Section divider before the metrics deep-dive.Installation
camp add sectionOr with any shadcn-compatible CLI:
bunx shadcn@latest add https://campfire-deck.vercel.app/r/section.jsonCopy the source into layouts/section.tsx. It imports cn from
@/lib/utils — scaffolded by camp init, or camp add utils:
import type { ComponentProps } from "react";
import { cn } from "@/lib/utils";
export type SectionLayoutProps = ComponentProps<"main"> & {
/** From the slide's `title` frontmatter. */
title?: string;
};
/** A full-bleed divider slide on the primary color. */
export default function SectionLayout({
title,
className,
children,
...props
}: SectionLayoutProps) {
return (
<main
className={cn(
"flex h-full flex-col justify-center gap-8 bg-primary p-28 text-background",
className
)}
data-slot="section-layout"
{...props}
>
{title ? (
<h1 className="font-bold font-heading text-8xl tracking-tight">
{title}
</h1>
) : null}
<div
className="max-w-4xl text-3xl leading-relaxed opacity-90"
data-slot="section-layout-body"
>
{children}
</div>
</main>
);
}Usage
Works with an empty body too — a bare divider between chapters:
---
layout: section
title: Numbers
---The background uses the theme's --color-primary; change the theme and every
section divider follows.
API Reference
Follows the layout contract and exposes
data-slot="section-layout" and section-layout-body:
Prop
Type