subheading.tsx

src/components/subheading.tsx
import React from 'react'
import { clsx } from 'clsx'
import type { HTMLAttributes } from 'react'
import { generateIdFromChildren } from '@/tools/generate-id-from-children'
type SubheadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div'
interface SubheadingProps extends HTMLAttributes<HTMLHeadingElement> {
children?: React.ReactNode
className?: string
/** Custom ID for the subheading. If not provided, will be auto-generated from children content */
id?: string
/** The HTML tag to render (h1, h2, h3, h4, h5, h6, p, div) */
as?: SubheadingLevel
/** Font size override */
fontSize?: string
/** Font weight override */
fontWeight?: string
/** Letter spacing override */
letterSpacing?: string

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