Skip to content
Klarhimmel UI

Features, bento

Features, bento previewFeatures, bento preview

Install

npx shadcn add @klarhimmel/features-bento
DetailsAbout, usage, props and more

A mixed-size tile grid of up to seven features. Medium and large tiles carry an image, small tiles stay text-only. Pair a large tile with a small one.

Import

Import

import Block from '@/components/klarhimmel/blocks/features-bento';
Also called
  • features/bento
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

An uneven grid of feature tiles, some larger than others, each with an icon, text and an image. Use it when features differ in importance; features-grid fits when they are equal.

Writing for it

- Each tile takes a layout of sm, md or lg, meaning a third, half or two thirds of a row. Mix them so each row adds up to a full width. - Tile titles hold 60 characters and descriptions 200. Large tiles also show their media, so save the strongest feature for lg. - Two to seven tiles are allowed. Fewer than four leaves the bento shape unclear, so use features-list instead.

Watch out for

Each tile needs an icon and a media object in the schema, and an image slot shows for large tiles even when empty. Fill the media or the tile shows a blank panel.

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 FeaturesBento from '@/components/klarhimmel/blocks/features-bento';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <FeaturesBento props={{
          "eyebrow": "Name the topic",
          "title": "Say what the whole product gives the reader",
          "description": "Say in one sentence what the features below have in common and who they help.",
          "tiles": [
            {
              "layout": "md",
              "icon": "layers",
              "title": "Name the first feature",
              "description": "Say what the first feature does and why it helps, in a sentence or two of plain words.",
              "media": {
                "src": "/pictures/scr-pricing.avif",
                "alt": "A pricing page with three plans",
                "srcDark": "/pictures/scr-pricing-dark.avif"
              }
            },
            {
              "layout": "md",
              "icon": "zap",
              "title": "Name feature two",
              "description": "Say what the second feature does and why it helps, in a sentence or two of plain words.",
              "media": {
                "src": "/pictures/scr-card.avif",
                "alt": "A card with a title and a button",
                "srcDark": "/pictures/scr-card-dark.avif"
              }
            }
          ]
        }} />
      </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
eyebrowstring'Name the topic'Text, up to 60 characters.
titlestring'Say what the whole product gives th…'Text, up to 120 characters.
descriptionstring'Say in one sentence what the featur…'Text, up to 300 characters.
tiles{ layout, icon, title, description, media }[]7 itemsList of 2 to 7. Each item: layout ('sm' | 'md' | 'lg'), 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, media.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.