DocsComponentsPrimitives
Heading
React example follows below.
ts
import { Eyebrow, Heading, Text } from "@grassroot/ui-react"; <Eyebrow>01 · Infrastructure</Eyebrow><Heading level={1}>Software you can stop worrying about.</Heading><Text>Apps, APIs and deploys that stay understandable.</Text><Text variant="muted">Secondary supporting copy.</Text><Text variant="mono">build · 2026.06.21 · a1b2c3d</Text>ts
<script setup lang="ts">import { Eyebrow, Heading, Text } from "@grassroot/ui-vue";</script> <template> <Eyebrow>01 · Infrastructure</Eyebrow> <Heading :level="1">Software you can stop worrying about.</Heading> <Text>Apps, APIs and deploys that stay understandable.</Text> <Text variant="muted">Secondary supporting copy.</Text> <Text variant="mono">build · 2026.06.21 · a1b2c3d</Text></template>ts
import { Component } from "@angular/core";import { GrassrootEyebrow, GrassrootHeading, GrassrootText } from "@grassroot/ui-angular"; @Component({ selector: "app-example", standalone: true, imports: [GrassrootEyebrow, GrassrootHeading, GrassrootText], template: ` <grassroot-eyebrow>01 · Infrastructure</grassroot-eyebrow> <grassroot-heading [level]="1">Software you can stop worrying about.</grassroot-heading> <grassroot-text>Apps, APIs and deploys that stay understandable.</grassroot-text> <grassroot-text variant="muted">Secondary supporting copy.</grassroot-text> <grassroot-text variant="mono">build · 2026.06.21 · a1b2c3d</grassroot-text> `,})export class ExampleComponent {}ts
<script lang="ts"> import { Eyebrow, Heading, Text } from "@grassroot/ui-svelte";</script> <Eyebrow>01 · Infrastructure</Eyebrow><Heading level={1}>Software you can stop worrying about.</Heading><Text>Apps, APIs and deploys that stay understandable.</Text><Text variant="muted">Secondary supporting copy.</Text><Text variant="mono">build · 2026.06.21 · a1b2c3d</Text>ts
import { Eyebrow, Heading, Text } from "@grassroot/ui-solid"; export function Example() { return ( <> <Eyebrow>01 · Infrastructure</Eyebrow> <Heading level={1}>Software you can stop worrying about.</Heading> <Text>Apps, APIs and deploys that stay understandable.</Text> <Text variant="muted">Secondary supporting copy.</Text> <Text variant="mono">build · 2026.06.21 · a1b2c3d</Text> </> );}Installation
bash
pnpm dlx grassroot add ui/headingbash
npx grassroot@latest add ui/headingbash
yarn dlx grassroot add ui/headingbash
bunx grassroot add ui/headingAPI Reference
| Prop | Type | Default |
|---|---|---|
levelHeading level 1–4, also sets the default tag (h1–h4). | 2 | 1 | 3 | 4 | undefined | 2 |
asOverride the rendered element without changing the visual size. | React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined | — |
emphasisBump to the emphasized weight (M3 Expressive) for the loudest title on a surface. | boolean | undefined | false |