Docs / Components

SenseCardComponent

Content surface from @artificialsenselabs/ui with optional header, footer, elevation, and dismiss action.

Live demo: run nx serve showcase and open /components/card (port 4202).

Overview

Category: Layout. Selector: sense-card. Import: import { SenseCardComponent } from '@artificialsenselabs/ui';

<sense-card subtitle="Updated today">
  <span card-header>Account</span>
  <p>Body content.</p>
</sense-card>

Content slots

SelectorRegion
[card-header]Header title (linked via aria-labelledby when not hoverable).
[card-subtitle]Optional secondary header line (projected).
(default)Main body content.
[card-footer]Footer actions row.

Inputs

InputTypeDefaultDescription
elevation'none' | 'low' | 'medium' | 'high''medium'Shadow depth token.
borderedbooleanfalseVisible border treatment.
hoverablebooleanfalseInteractive surface (role="button"); set ariaLabel.
closablebooleanfalseDismiss via sense-icon-button; emits closed.
headerIconSenseIconName | nullnullLeading header glyph.
subtitlestring | nullnullProgrammatic subtitle under the title.
showHeader / showFooterboolean | nullnullForce region visibility; default shows both regions.
ariaLabelstring | nullnullName for hoverable cards.
closeAriaLabelstring | nullnullClose button label; falls back to card.close i18n.

Accessibility

  • Static cards use aria-labelledby pointing at the header title id.
  • Hoverable cards use role="button" — provide ariaLabel.
  • Close control is a labelled sense-icon-button.
  • Hover lift animation pauses under prefers-reduced-motion.