Generate and export Tailwind color patterns.
A flexible and accessible title component that supports different heading levels, styling options, and content structure.
The Title component is a highly customizable heading component that ensures accessibility and SEO best practices while providing flexible styling options.
npx pixelblock-cli add Title
This will copy the Title.tsx file to your project's components/PixelBlock directory.
your-project/
├── components/
│ └── PixelBlock/
│ └── Title.tsx
└── ...
After installing the Title component, you can use it in your React application.
Explore our amazing features and services.
With supporting content below
| Prop | Type | Default | Description |
|---|---|---|---|
| title | ReactNode | - | The main title content (supports strings and JSX) |
| content | string | - | Optional supporting content below the title |
| className | string | "" | Additional CSS classes to apply to the wrapper |
| as | ElementType | "h2" | HTML element or component to render the title as |
| fontSize | string | "lg:text-[2.85rem] text-3xl" | Custom font size using Tailwind classes |
| fontWeight | "sm" | "md" | "lg" | "xl" | "lg" | Predefined font weight options |
| ariaLevel | number | - | Sets aria-level for non-heading elements |
role="heading" and aria-level attributesThe component includes development warnings for:
<h1> tags to ensure proper page structureColor handling:
Responsive design: