Card & Grid
Cards with text, images, and links in responsive grids.
Usage#
Images#


Use image for your own image, or let an external href supply a preview. Set imageMode to slot or background. Background images blur behind the text; imageBlur=false turns that off. Use image=null to hide an image.
Use theme="light" or dark to keep text consistent over a fixed image. default follows the page; inverted reverses it.
Content#
Give a card a plain-text title and subtitle, and an optional icon. Set emphasis to title or subtitle to choose the stronger label.
Links#
Add href to make the card a link. Missing text comes from the destination; internal links can also inherit its icon. Explicit text takes precedence.
Set inferText=false to stop filling in missing text. Set title, subtitle, or icon to null to hide that field.
Layout#
Use layout="vertical" to stack the icon and text, or horizontal to place them side by side. Set minHeight in pixels to give them room; content can still grow beyond it.
align accepts top, bottom, or between. Between separates the icon from the labels vertically, or the icon and title from the subtitle horizontally.
Card Grid#
Nest grids to arrange your cards. Here, two cards sit on the left and one fills the right.
Grids use fewer columns when space is tight, including on mobile.
Card Reference#
titleDefaultundefinednull | stringPlain-text title. Omit to infer it from the destination when
inferTextis enabled;nullhides it.
subtitleDefaultundefinednull | stringPlain-text subtitle, without Markdown. Omit to infer the destination description when
inferTextis enabled;nullhides it.
inferTextDefaulttruebooleanFill missing
titleandsubtitlefrom the linked page. Explicit text takes precedence; images and icons are controlled independently.
emphasisDefault"title""title" | "subtitle"Label receiving the stronger foreground color.
hrefDefaultundefinedstringInternal or external destination. Omit for a non-interactive card; external destinations show an outgoing arrow.
themeDefault"default""default" | "inverted" | "dark" | "light"Follow the page theme, invert it, or lock the card to dark or light.
imageDefaultundefinednull | stringImage path or HTTP(S) URL. Omit to inherit an external preview image;
nulldisables the image.
imageModeDefault"slot""slot" | "background"Place the image in a top media slot or fill the card background.
imageBlurDefaulttruebooleanProgressively blur a background image behind the text for readability. No color overlay; ignored without a background image.
layoutDefault"vertical""vertical" | "horizontal"Stack the icon above the labels, or place it beside them.
alignDefault"top""top" | "bottom" | "between"Place content at the top or bottom.
betweenseparates icon and labels vertically, or title and subtitle horizontally.
minHeightDefaultundefinednumberMinimum card height in pixels. Content can grow beyond it.
iconDefaultundefinednull | IconIDRegistered icon ID. Omit to inherit the internal destination icon, including its ancestor icon;
nullhides it.
Grid Reference#
columnsDefault2numberMaximum number of columns, from 1 to 6. Narrower containers use fewer columns.
