The heading text.
The rendered SectionHeader component.
export default function SectionHeader({
title,
description,
children,
className = 'mx-4 my-8 w-full max-w-6xl',
headerClassName = 'mb-8 text-center'
}: SectionHeaderProps) {
return (
<section className={className}>
<header className={headerClassName}>
<h1 className="text-3xl font-bold text-slate-800 dark:text-slate-100">{title}</h1>
{description && (
<p className="mt-2 text-slate-600 dark:text-slate-300" role="article">
{description}
</p>
)}
</header>
{children}
</section>
);
}
Renders a section header with a title, optional description and optional children. Useful for page sections.
Example