Skip to content
Klarhimmel UI

Features, bento cards

Features, bento cards previewFeatures, bento cards preview

Install

npx shadcn add https://ui.klarhimmel.com/r/features-bento-cards.json
DetailsAbout, usage, props and more

A centred heading and line over a bento grid of bordered cards in three rows: a tall picture card beside two icon cards, a wide picture card with a full-width button…

Import

Import

import Block from '@/components/klarhimmel/blocks/features-bento-cards';
Also called
  • features/bento-cards
About
A centred heading and line over a bento grid of bordered cards in three rows: a tall picture card beside two icon cards, a wide picture card with a full-width button, then two icon cards beside a tall picture card.
Category
What it does, as a grid, a list, tabs or alternating rows. New project? Set it up once: /get-started/installation.

Notes

When to use it

A centred heading over a bento grid of bordered cards in three rows: picture cards and icon cards in turn. Use features-bento when you have no pictures, and features-grid for equal items.

Writing for it

- Each picture card has a picture on top and its text below, so choose images that read at a card width of about a third of the section. - The icon cards come in exact pairs and stack beside a tall card. Give each a title and one line, no more. - The wide card in row two carries a full-width button, so spend it on the one action the grid exists to lead to.

Watch out for

Every row stacks on a phone, which turns a seven card grid into a long column. The counts are fixed, so you cannot drop a card without changing the layout.

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 FeaturesBentoCards, { spec } from '@/components/klarhimmel/blocks/features-bento-cards';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FeaturesBentoCards props={spec.defaults} />
      </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 the benefits add up to'Text, up to 60 characters.
descriptionstring'Say in one or two sentences what ch…'Text, up to 160 characters.
lead{ media, title, description }{…}Fields: media, title, description.
sideCards{ icon, title, description }[]2 itemsList of 2 to 2. Each item: icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), title, description.
wide{ media, title, description, action }{…}Fields: media, title, description, action.
stackCards{ icon, title, description }[]2 itemsList of 2 to 2. Each item: icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), title, description.
tall{ media, title, description }{…}Fields: media, title, description.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.