Marketing sectionsBentoCards
Searchastronomic.dev# BentoCards
To show several strengths at once in tiles of different sizes, each with an icon, the most important one largest, and any tile able to link to more.
Static: no JavaScript.
## Usage
```astro
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
```
## Examples
### Studio strengths
Seven text tiles: a large highlighted tile first, a tall one, a wide one and four normal ones. One column on a phone, two from a 32rem section, four from 48rem. Dense packing fills the gaps the big tiles leave, so the two normal tiles after the wide one show above it; the keyboard and screen readers keep the source order. Each tile has a Lucide icon above its title.
```astro
---
import Accessibility from "@lucide/astro/icons/accessibility";
import Gauge from "@lucide/astro/icons/gauge";
import Layers from "@lucide/astro/icons/layers";
import LifeBuoy from "@lucide/astro/icons/life-buoy";
import Palette from "@lucide/astro/icons/palette";
import PenLine from "@lucide/astro/icons/pen-line";
import Users from "@lucide/astro/icons/users";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
const items = [
{ title: "Sites your team can run", text: "Every page is built for your editors, so new work and news go live without waiting on us.", size: "large" as const, highlighted: true, icon: Layers },
{ title: "Brand first", text: "We start from what makes your firm different, then design around it.", size: "tall" as const, icon: Palette },
{ title: "One team from brief to launch", text: "The people you meet in the first workshop are the people who build your site.", size: "wide" as const, icon: Users },
{ title: "Fast pages", text: "Small, quick pages that load well on any phone.", icon: Gauge },
{ title: "Clear copy", text: "We write with you, in your clients' words.", icon: PenLine },
{ title: "Accessible", text: "Readable, keyboard-friendly and tested with screen readers.", icon: Accessibility },
{ title: "Support", text: "Small changes every month, and help when you need it.", icon: LifeBuoy },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<BentoCards heading="Why firms choose us" items={items} />
</div>
```
### Every tile a link
Four tiles, each a link to an Astronomic page, with a viewText cue at the foot. The whole tile is the target and one tab stop, named by its title. With a link in the grid, BentoCards packs sparsely, so the visual order and the tab order stay the source order; the tiles are ordered (large, tall, two normal) to leave no hole at two or four columns.
```astro
---
import GraduationCap from "@lucide/astro/icons/graduation-cap";
import Layers from "@lucide/astro/icons/layers";
import LayoutGrid from "@lucide/astro/icons/layout-grid";
import Search from "@lucide/astro/icons/search";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
// Every tile is a link, so the grid packs sparsely and keeps the source order: large, tall, then two normal tiles fill
// four columns (two rows) and two columns (three rows) with no hole.
const items = [
{ title: "Astronomic UI", text: "The free kit and the Pro parts every theme is built on, with props, slots and examples for each.", size: "large" as const, icon: Layers, href: "/ui", viewText: "Browse the kit" },
{ title: "Astro themes", text: "Production-ready themes for studios, newsletters, firms, trades and real estate. Each works with plain Astro and with EmDash.", size: "tall" as const, icon: LayoutGrid, href: "/themes", viewText: "See the themes" },
{ title: "Learn", text: "Plain guides to building your own site and moving from WordPress.", icon: GraduationCap, href: "/learn", viewText: "Read the guides" },
{ title: "Astronomic Search", text: "Free, typo-tolerant search for Astro, with filters and a default dialog.", icon: Search, href: "/plugins/search", viewText: "Add search" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<BentoCards heading="Start here" items={items} />
</div>
```
### An inverse tile, without a heading
A large tile with tone="inverse" and an icon leads seven text tiles. There is no section heading: the page has its own h1, so itemHeadingTag="h2" puts each tile title one level under it.
```astro
---
import InfinityIcon from "@lucide/astro/icons/infinity";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
// No heading: the page's own h1 is the heading, so each tile title is an h2 (itemHeadingTag).
const items = [
{ title: "Lifetime updates", text: "Pay once. Every update to the themes you own is yours, with no subscription.", size: "large" as const, tone: "inverse" as const, icon: InfinityIcon },
{ title: "Unlimited sites", text: "Use a theme on every site you build, for you or for clients." },
{ title: "Plain Astro or EmDash", text: "Every theme works in plain Astro. EmDash is supported too." },
{ title: "Accessible", text: "Keyboard-friendly, readable and checked for contrast in light and dark." },
{ title: "Fast pages", text: "Small static pages that load quickly on any phone." },
{ title: "Docs in the box", text: "Each theme comes with docs on setup and content.", size: "wide" as const },
{ title: "Bug fixes", text: "Report a bug on GitHub and the fix ships in an update." },
{ title: "Presets", text: "Change fonts, colors and corners without touching a component." },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<h1 class="mb-8 text-title text-balance">The Themes Pass</h1>
<BentoCards itemHeadingTag="h2" items={items} />
</div>
```
## Props
### BentoCards
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the section role in display type. Without it there is no section and no header: a plain <div> holds only the tiles. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside, as in "Built for *the long run*". Any other asterisks show as typed. Off by default, so the heading shows as typed. How the <em> looks is the theme's. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Tile titles sit one level under it. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | `"h3"` | The tile title element when there is no heading. With a heading, titles sit one level under it. |
| `items` | `BentoTileItem[]` | None | Required. The tiles, in source order: { title, text?, size?, highlighted?, tone?, icon?, href?, viewText? } (BentoTileItem, exported from BentoCards.astro). size is "normal" (one cell, the default), "wide" (two across), "tall" (two down) or "large" (two by two). Below 32rem of width the grid is one column. From 32rem it has two: wide and large tiles take the full row, a tall tile two rows. From 48rem it has four, and a large tile is two by two. Every row is at least --ui-bento-row tall (11rem by default). highlighted gives a tile the soft accent fill; mark one at most, the most important. tone="inverse" gives the inverse fill instead (not with highlighted). icon draws a decorative icon above the title. text is optional. href makes the whole tile one link, its name the title; viewText (only with href) adds a cue such as "Learn more" at its foot. With any href the grid packs sparse, so the focus order follows the visual order: order the tiles so they leave no hole. Contradictory fields stop the build, naming the tile. Only these fields reach each tile, so a CMS entry's other fields never land on the page. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
Any other attribute goes on the <section>, or on the <div> without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders a plain <div>. Put your own heading above it.
- The tiles sit in one list (<ul role="list">), so a screen reader says how many there are.
- Each tile title sits one level under the section heading (h2 gives h3). With no heading, it is an h3 unless you set itemHeadingTag (recipes). In a bare Bento, set each tile's headingTag yourself.
- bentoGrid packs tiles densely, so the visual order can differ from the source order. Screen readers and the keyboard follow the source: put the most important tile first.
- Dense packing is fine for static tiles, not for links: Tab would jump. A grid with any linked tile packs sparse (bentoGridSparse in lib/bento.ts; the recipes switch on their own), so the focus order follows the visual order. A sparse grid can leave a hole: order the tiles so they fit.
- A linked tile is one link named by its title, so put anything that matters in the title or the text. A media visual that only decorates takes aria-hidden="true"; one that informs (a stat, a quote, code) keeps text a screen reader can read. Keep headings out of the media slot.
- The highlighted tile is marked by its fill and its place, not by color alone: make it the first and the largest.
BentoCards
ProTo show several strengths at once in tiles of different sizes, each with an icon, the most important one largest, and any tile able to link to more.
- File
- BentoCards.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 3
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Studio strengths
Seven text tiles: a large highlighted tile first, a tall one, a wide one and four normal ones. One column on a phone, two from a 32rem section, four from 48rem. Dense packing fills the gaps the big tiles leave, so the two normal tiles after the wide one show above it; the keyboard and screen readers keep the source order. Each tile has a Lucide icon above its title.
This preview did not load.
examples/bentocards/main.astro
---
import Accessibility from "@lucide/astro/icons/accessibility";
import Gauge from "@lucide/astro/icons/gauge";
import Layers from "@lucide/astro/icons/layers";
import LifeBuoy from "@lucide/astro/icons/life-buoy";
import Palette from "@lucide/astro/icons/palette";
import PenLine from "@lucide/astro/icons/pen-line";
import Users from "@lucide/astro/icons/users";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
const items = [
{ title: "Sites your team can run", text: "Every page is built for your editors, so new work and news go live without waiting on us.", size: "large" as const, highlighted: true, icon: Layers },
{ title: "Brand first", text: "We start from what makes your firm different, then design around it.", size: "tall" as const, icon: Palette },
{ title: "One team from brief to launch", text: "The people you meet in the first workshop are the people who build your site.", size: "wide" as const, icon: Users },
{ title: "Fast pages", text: "Small, quick pages that load well on any phone.", icon: Gauge },
{ title: "Clear copy", text: "We write with you, in your clients' words.", icon: PenLine },
{ title: "Accessible", text: "Readable, keyboard-friendly and tested with screen readers.", icon: Accessibility },
{ title: "Support", text: "Small changes every month, and help when you need it.", icon: LifeBuoy },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<BentoCards heading="Why firms choose us" items={items} />
</div>Every tile a link
Four tiles, each a link to an Astronomic page, with a viewText cue at the foot. The whole tile is the target and one tab stop, named by its title. With a link in the grid, BentoCards packs sparsely, so the visual order and the tab order stay the source order; the tiles are ordered (large, tall, two normal) to leave no hole at two or four columns.
This preview did not load.
examples/bentocards/links.astro
---
import GraduationCap from "@lucide/astro/icons/graduation-cap";
import Layers from "@lucide/astro/icons/layers";
import LayoutGrid from "@lucide/astro/icons/layout-grid";
import Search from "@lucide/astro/icons/search";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
// Every tile is a link, so the grid packs sparsely and keeps the source order: large, tall, then two normal tiles fill
// four columns (two rows) and two columns (three rows) with no hole.
const items = [
{ title: "Astronomic UI", text: "The free kit and the Pro parts every theme is built on, with props, slots and examples for each.", size: "large" as const, icon: Layers, href: "/ui", viewText: "Browse the kit" },
{ title: "Astro themes", text: "Production-ready themes for studios, newsletters, firms, trades and real estate. Each works with plain Astro and with EmDash.", size: "tall" as const, icon: LayoutGrid, href: "/themes", viewText: "See the themes" },
{ title: "Learn", text: "Plain guides to building your own site and moving from WordPress.", icon: GraduationCap, href: "/learn", viewText: "Read the guides" },
{ title: "Astronomic Search", text: "Free, typo-tolerant search for Astro, with filters and a default dialog.", icon: Search, href: "/plugins/search", viewText: "Add search" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<BentoCards heading="Start here" items={items} />
</div>An inverse tile, without a heading
A large tile with tone="inverse" and an icon leads seven text tiles. There is no section heading: the page has its own h1, so itemHeadingTag="h2" puts each tile title one level under it.
This preview did not load.
examples/bentocards/inverse.astro
---
import InfinityIcon from "@lucide/astro/icons/infinity";
import BentoCards from "@astronomic/ui-pro/components/BentoCards.astro";
// No heading: the page's own h1 is the heading, so each tile title is an h2 (itemHeadingTag).
const items = [
{ title: "Lifetime updates", text: "Pay once. Every update to the themes you own is yours, with no subscription.", size: "large" as const, tone: "inverse" as const, icon: InfinityIcon },
{ title: "Unlimited sites", text: "Use a theme on every site you build, for you or for clients." },
{ title: "Plain Astro or EmDash", text: "Every theme works in plain Astro. EmDash is supported too." },
{ title: "Accessible", text: "Keyboard-friendly, readable and checked for contrast in light and dark." },
{ title: "Fast pages", text: "Small static pages that load quickly on any phone." },
{ title: "Docs in the box", text: "Each theme comes with docs on setup and content.", size: "wide" as const },
{ title: "Bug fixes", text: "Report a bug on GitHub and the fix ships in an update." },
{ title: "Presets", text: "Change fonts, colors and corners without touching a component." },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<h1 class="mb-8 text-title text-balance">The Themes Pass</h1>
<BentoCards itemHeadingTag="h2" items={items} />
</div>