Heading
Semantic heading (h1–h6) mapped to the type ramp.
Code
import * as React from 'react';
import { Heading, Stack } from '@fruit-labs/design';
export default function Demo() {
return (
<Stack gap={1}>
<Heading level={1}>Large title</Heading>
<Heading level={2}>Title 1</Heading>
<Heading level={3}>Title 2</Heading>
</Stack>
);
}Install
From npm:
npm install @fruit-labs/design
import { Heading } from '@fruit-labs/design';Or copy the TypeScript source into your project:
npx shadcn@latest add https://design.fruitlabs.online/r/heading.jsonGuidelines
- Pick
levelfor document structure andsizefor looks when they differ.
Props
| Prop | Type | Required |
|---|---|---|
level | 1 | 2 | 3 | 4 | 5 | 6 | No |
size | 'large-title' | 'title-1' | 'title-2' | 'title-3' | 'headline' | No |
id | string | No |
className | string | No |
style | React.CSSProperties | No |
children | React.ReactNode | No |