Sajari UI

Heading

Headings are used for rendering headlines.

Heading composes Box so you can use all the style props. It renders an <h1> element by default.

Import

Usage

Editable Example

I'm a Heading

Changing font size

By default, the size prop is automatically determined by the heading level, set via as prop. To change the size of the heading, you can use the size prop.

Editable Example

In love with React & Next

In love with React & Next

In love with React & Next

In love with React & Next

In love with React & Next
In love with React & Next

Truncate heading

Pass the truncate prop to render an ellipsis when the headings exceeds.

Editable Example

Basic text writing, including headings, body text, lists, and more.

Override style

You can override the size of the Heading component by passing the fontSize prop.

Editable Example

I'm overriding this heading

Props

The Heading composes the Box component, so you can pass all Box props.

NameTypeDefaultDescription
ash1, h2, h3, h4, h5, h6h1The element to render for the heading.
size2xl, xl , lg, md, sm, xsThe text size of the heading.
truncateboolean, 2, 3, 4, 5falseWhether to truncate the heading. Numeric values are used for line clamping.