DocsComponentsTemplatesThemesGitHub

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.json

Guidelines

  • Pick level for document structure and size for looks when they differ.

Props

PropTypeRequired
level1 | 2 | 3 | 4 | 5 | 6No
size'large-title' | 'title-1' | 'title-2' | 'title-3' | 'headline'No
idstringNo
classNamestringNo
styleReact.CSSPropertiesNo
childrenReact.ReactNodeNo

Edit this example on GitHub