1.15.0-beta.1 • Published 21 days ago
@squiz/xaccel-dynamic-heading v1.15.0-beta.1
Dynamic Heading
This package provides a component capable of rendering text as any heading level (h1 through h6) or as a span element, depending on the provided props. It's designed for dynamic text content where the semantic importance might vary based on context.
Component Properties
Property Name | Property description | Property Type | IsRequired |
---|---|---|---|
type | Specifies the heading level (h1 -h6 ) or none for a span . Default is none . | string | |
children | The text content or other React nodes to be rendered inside the heading or span . | React.ReactNode |
Props Example:
<DynamicHeading
type="h2"
className="customClass"
>
Heading of h2 level
</DynamicHeading>
Usage:
Install the package by running: npm i @squiz/xaccel-dynamic-heading
import { DynamicHeading } from '@squiz/xaccel-dynamic-heading';
function SomeReactComponent({ content }) {
return <DynamicHeading type="h3">{content}</DynamicHeading>;
}
1.15.0-beta.1
21 days ago
1.14.0-alpha.1
21 days ago
1.13.1
3 months ago
1.12.1
4 months ago
1.13.0-beta.1
4 months ago
1.9.1-alpha.0
4 months ago
1.12.1-alpha.0
4 months ago
1.9.1-beta.0
4 months ago
1.9.0
4 months ago
1.9.0-beta.36
4 months ago
1.10.0-alpha.5
7 months ago
1.2.0
9 months ago
1.1.0
9 months ago