Registry
Title
Opening slide: oversized title with supporting copy.
---
layout: title
title: Campfire
---
Where stories are told. Slides are MDX files, layouts are React,
and the whole deck is just a repository.Installation
camp add titleOr with any shadcn-compatible CLI:
bunx shadcn@latest add https://campfire-deck.vercel.app/r/title.jsonCopy the source into layouts/title.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 TitleLayoutProps = ComponentProps<"main"> & {
/** From the slide's `title` frontmatter. */
title?: string;
};
/** Opening slide: oversized title with supporting copy. */
export default function TitleLayout({
title,
className,
children,
...props
}: TitleLayoutProps) {
return (
<main
className={cn(
"flex h-full flex-col justify-center gap-10 p-28",
className
)}
data-slot="title-layout"
{...props}
>
{title ? (
<h1 className="max-w-5xl font-bold font-heading text-8xl tracking-tight">
{title}
</h1>
) : null}
<div
className="max-w-4xl text-3xl leading-relaxed opacity-80"
data-slot="title-layout-body"
>
{children}
</div>
</main>
);
}Usage
A slide selects the layout by filename in its frontmatter; the slide body
becomes children:
---
layout: title
title: Campfire
---
Where stories are told.API Reference
Follows the layout contract and exposes
data-slot="title-layout" and title-layout-body:
Prop
Type