Item Card Group
A layout component for grouping item cards in list or grid arrangements with section headers and dividers.
Usage
Workspace
Acme Inc, on the Pro plan
Advanced
Anatomy
Import the ItemCardGroup component and access all parts using dot notation.
import { ItemCardGroup } from "@blakeui/pro-react";
<ItemCardGroup>
<ItemCardGroup.Header>
<ItemCardGroup.Title />
<ItemCardGroup.Description />
</ItemCardGroup.Header>
</ItemCardGroup>;Grid
Integrations
Services connected to this workspace
Grid Three Columns
Edge regions
Median response time over the last hour
Linked Accounts
Linked accounts
Sign in faster with a connected provider
List
Multiple Sections
Account
Workspace
Notification Preferences
Notification preferences
Pick the channels each kind of message may use
Permission Levels
Permission levels
What each member may do in this workspace
Pressable
There is no pressable variant — render swaps each card's root for a button, and the group takes overflow-hidden so a square row highlight cannot escape its rounded corners.
Settings
Every row is a button, so it answers to hover, press and keyboard focus
Variants
default
Surface fill under a 1px border. The default, and flat.
secondary
Secondary fill, same 1px border. Separators and icon squares repaint to suit it.
tertiary
Tertiary fill, one step further from the page background.
outline
The same 1px border over nothing — the page shows through.
transparent
No fill, no border, no corners. Pure layout.
Wallet List
Wallets
Balances refreshed a moment ago
With Header
Subscription
The title is an h3 and the description a p, so the header carries the group's heading level on its own
CSS Classes
Base Class
.item-card-group— The container. Carries onlyborder-radius: --radius * 2and no padding of its own, so in list layout the rows run edge to edge and the group's corners are the panel's corners. Everything else — fill, stroke, and the layout itself — comes from the variant and layout modifiers below.
Variant Classes
.item-card-group--default—background-color: --surfaceplus1px solid --border. Bordered and flat, like every variant below it..item-card-group--secondary—background-color: --surface-secondaryplus1px solid --border..item-card-group--tertiary—background-color: --surface-tertiaryplus1px solid --border..item-card-group--outline—1px solid --borderover a transparent background, withbox-shadow: none. It differs fromdefaultonly in the fill..item-card-group--transparent— Transparent background, no border,box-shadow: none, andborder-radius: 0. The only variant that also drops the corners.
Layout Classes
.item-card-group--list—display: flexwithflex-direction: column. The rows stack and aSeparatorbetween them draws the divider..item-card-group--grid—display: gridoverrepeat(var(--item-card-group-columns), minmax(0, 1fr))with a--spacing * 3gap. It also zeroes the group's own fill, stroke, and shadow, so in grid layout the variant modifier has nothing left to paint — the cards are the surfaces. All three rules are single-class selectors, so this one has to stay below the variant rules in the stylesheet to win.
Element Classes
.item-card-group__header—--spacing * 4inline and top padding,--spacing * 2bottom. In grid layout the padding is dropped to0and the part spansgrid-column: 1 / -1, so the heading sits above the whole grid rather than inside the first cell..item-card-group__title— 0.875rem / 1.25rem at weight 600 in--foreground. Heavier than.item-card__title, which is weight 500, so the section heading outranks the row labels..item-card-group__description— 0.75rem / 1rem in--mutedwithmargin-top: --spacing * 0.5.
Descendant Rules
.item-card-group--list > [data-slot="item-card"]— In list layout only, each card gives up its ownborder-width,border-radius,background-color, andbox-shadow, so the rows read as one panel instead of a stack of separate cards. Grid layout is deliberately excluded, which is why grid cards keep the bordered-flat treatment they have anywhere else.:is(.item-card-group--secondary, .item-card-group--tertiary) [data-slot="separator"]— On the two filled non-default surfaces the divider repaints tocolor-mix(in oklab, var(--muted) 10%, transparent), because the default separator has too little contrast against them.:is(.item-card-group--secondary, .item-card-group--tertiary) > [data-slot="item-card"] > [data-slot="item-card-icon"]— The same reasoning for the icon square, which repaints tocolor-mix(in oklab, var(--surface) 50%, transparent).
CSS Variables
--item-card-group-columns— Column count for grid layout. Declared as2on.item-card-group--gridand overridden inline by thecolumnsprop. Setting it yourself on any ancestor works too, since the grid template reads it throughvar().
Data Attributes
[data-slot="item-card-group"],[data-slot="item-card-group-header"],[data-slot="item-card-group-title"],[data-slot="item-card-group-description"]— One per part, so any of them can be targeted without depending on its BEM class. The descendant rules above are the component's own use of them, together with[data-slot="item-card"]and[data-slot="separator"]from the parts it wraps.
API Reference
ItemCardGroup
The root. A div with role="group" that lays its children out and paints the shared surface.
| Prop | Type | Default | Description |
|---|---|---|---|
layout | "list" | "grid" | "list" | How the children are arranged, and which of the two surface models applies. In list the group is the surface and its cards are stripped flat, so put a Separator between them to divide the rows. In grid the group paints nothing at all and each card keeps its own bordered-flat treatment; separators are not used there. |
variant | "default" | "secondary" | "tertiary" | "outline" | "transparent" | "default" | Which surface the group paints. Every variant except transparent carries a 1px border, and none is elevated. It only has an effect in list layout — grid zeroes the fill, the stroke, and the shadow — though it still decides the separator and icon-square colours through the descendant rules under CSS Classes. |
columns | 2 | 3 | 2 | Column count, applied as an inline --item-card-group-columns. It is read only when layout is "grid"; passing it to a list is ignored rather than an error. Leaving it out keeps the 2 the stylesheet declares. |
children | ReactNode | — | The cards, any Separators between them, and at most one ItemCardGroup.Header. The header is optional and nothing enforces its position, but the layout assumes it comes first. |
className | string | — | Merged onto .item-card-group, alongside the variant and layout modifiers. |
Also accepts every native div attribute.
ItemCardGroup.Header
The section heading area. A div, padded in list layout and spanning the full row in grid.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Normally ItemCardGroup.Title and ItemCardGroup.Description. Either may be omitted; the padding belongs to the header, so a title on its own still sits correctly. |
className | string | — | Merged onto .item-card-group__header. |
Also accepts every native div attribute.
ItemCardGroup.Title
The section heading. Rendered as an h3.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | The heading text. The element is a fixed h3, so on a page where that is the wrong level, override it with aria-level rather than restyling a different tag. |
className | string | — | Merged onto .item-card-group__title. |
Also accepts every native h3 attribute.
ItemCardGroup.Description
The supporting line under the title. Rendered as a p in --muted.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | The secondary text. It wraps rather than truncating, unlike the row-level ItemCard.Description, so a long line grows the header instead of being ellipsised. |
className | string | — | Merged onto .item-card-group__description. |
Also accepts every native p attribute.