Heading
A semantically-leveled heading, sized off the shared type scale.
fandry-heading
Example
Link to section ExampleCustom colors and parts
Link to section Custom colors and partsThe same component with a few --fd-* tokens set around it and its parts restyled. The code is under Parts below.
Props
Link to section Props| Prop | Type | Default | Description |
|---|---|---|---|
level | 1 | 2 | 3 | 4 | 5 | 6 | 2 | Heading level: renders the matching h1-h6. |
Parts
Link to section PartsStyle the elements inside the component from your own CSS with ::part(). Every fandry component renders in native shadow DOM, so parts work on LWR and Salesforce alike. For colors, spacing, radius and type across many components, set the --fd-* tokens instead. The code for the "Custom colors and parts" example above:
| Part | Description |
|---|---|
base | The outermost element. |
<!-- template -->
<div class="brand stack">
<fandry-heading level="4" class="eyebrow">New arrivals</fandry-heading>
<fandry-heading level="2">The summer collection</fandry-heading>
</div>
/* css */
/* Scoped to this demo. Set the same --fd-* tokens on :root to theme
every fandry-* component on the site. */
.brand {
--fd-font-heading: Georgia, "Times New Roman", serif;
--fd-text: 160 40% 14%;
--fd-heading-letter-spacing: -0.02em;
}
fandry-heading.eyebrow::part(base) {
font-family: system-ui, sans-serif;
font-size: 0.75rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: hsl(160 84% 26%);
}
Code
Link to section Code<fandry-heading level="2">Section title</fandry-heading>