Skip to content
Klarhimmel UI

Content, offset

Content, offset previewContent, offset preview

Install

npx shadcn add https://ui.klarhimmel.com/r/content-offset.json
DetailsAbout, usage, props and more

A large heading at the top left and one long paragraph in a narrower column set well to the right and lower down, with open space on the left; on a phone the paragraph…

Import

Import

import Block from '@/components/klarhimmel/blocks/content-offset';
Also called
  • content/offset
About
A large heading at the top left and one long paragraph in a narrower column set well to the right and lower down, with open space on the left; on a phone the paragraph sits under the heading at full width.
Category
Long-form text and timelines for about and policy pages. New project? Set it up once: /get-started/installation.

Notes

When to use it

A large heading at the top left and one long paragraph in a narrower column set well to the right and lower down, leaving open space on the left. Choose content-prose for ordinary reading text.

Writing for it

- Write the paragraph as one continuous thought. It is a single multiline field and blank lines make paragraph breaks. - Keep the heading short, two to six words, so it stays on one or two lines at its large size. - Use the open space on purpose, with no other content competing in the section.

Watch out for

The offset only shows on a wide container. On a phone the paragraph sits under the heading at full width, so the design depends on room that a narrow screen does not have.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import ContentOffset from '@/components/klarhimmel/blocks/content-offset';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ContentOffset props={{
          "title": "Say what this explanation is about",
          "body": "Explain in a few sentences how something works for the reader: where the figure or claim comes from, what is counted and how it is checked. Keep it to one long paragraph written in plain words, so the visitor can follow it from start to finish without a diagram."
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
titlestring'Say what this explanation is about'Text, up to 60 characters.
bodystring'Explain in a few sentences how some…'Text, up to 900 characters.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.