Skip to content

Card ​

hx-card is a surface for grouped content. Project a header with hxCardHeader (an image, say), a title with hxCardTitle, a subtitle with hxCardSubtitle, the content, and a footer with hxCardFooter; or use the title and subtitle inputs as a shortcut. Regions without content take no space.

html
<hx-card title="Billing" subtitle="October" [headingLevel]="3">
  <img hxCardHeader src="chart.png" alt="" />
  Total due: 120 EUR
  <div hxCardFooter><button hx-button>Pay</button></div>
</hx-card>
InputTypeDefaultDescription
titlestring''The title (a shortcut for the hxCardTitle slot).
subtitlestring''The subtitle (a shortcut for the hxCardSubtitle slot).
headingLevelnumber2Level of the title heading, 1 to 6.
  • Accessibility: the title is a real heading (h1 to h6 by headingLevel) so the page outline stays right; the card adds no role. An empty title is hidden, not left as an empty heading.

Tokens ​

The look comes from the design tokens --h-card-* (see Theming); override them in your theme, never the component CSS.

Part of @gravionlabs/helix-ui; all components are listed in the component reference.

Released under the MIT licence.