fancy-heading.tsx

src/components/fancy-heading.tsx
import { Heading } from '@/components/heading'
import { Accent } from '@/components/accent'
import clsx from 'clsx'
interface FancyHeadingProps {
text: string
accent: string
className?: string
id?: string
as?: 'h1' | 'h2'
margin?: string
}
// Helper function to generate a valid ID from text
function generateId(text: string, accent: string): string {
const combined = `${text} ${accent}`
const processed = combined
.toLowerCase()
.replace(/[^\w\s-]/g, '') // Remove special characters except spaces and hyphens
.replace(/\s+/g, '-') // Replace spaces with hyphens

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC