@k8ordo/ui

Heading

A heading. level picks the element, h1 to h6.

Import

ts
import { Heading } from '@k8ordo/ui';

Usage

Section Title

tsx
<Heading level="h2">Section Title</Heading>

Levels

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
tsx
<Heading level="h1">Heading 1</Heading>
<Heading level="h2">Heading 2</Heading>
<Heading level="h3">Heading 3</Heading>
<Heading level="h4">Heading 4</Heading>
<Heading level="h5">Heading 5</Heading>
<Heading level="h6">Heading 6</Heading>

Line clamp

This is a very long heading text that will be truncated to a single line using line clamp

tsx
<Heading lineClamp={1} level="h3">
  This is a very long heading text that will be
  truncated to a single line using line clamp
</Heading>

Props

level
Type: 'h1'|'h2'|'h3'|'h4'|'h5'|'h6'
Default: -
children?
Type: ReactNode
Default: -
lineClamp?
Type: 1|2|3|4|5|6
Default: -
PropTypeDefault
level'h1'|'h2'|'h3'|'h4'|'h5'|'h6'-
children?ReactNode-
lineClamp?1|2|3|4|5|6-

Inherited attributes (except the ones set internally): HTMLAttributes<HTMLHeadingElement>

k8ordo

React libraries that use Baseline features without holding back.