Entity Card

A clickable card surface for representing an entity such as a device, asset, or account.

Scheduled to finish at 18:30

Usage

import {
  EntityCard,
  EntityCardBody,
  EntityCardControls,
  EntityCardDetail,
  EntityCardFooter,
  EntityCardHeader,
  EntityCardIcon,
  EntityCardMeters,
  EntityCardState,
  EntityCardTitle,
  EntityCardTitleColumn,
  EntityCardValue,
} from '@epilot/spark-ui/entity-card'
import { EvStation } from '@epilot/spark-icons'

EntityCard is a non-interactive container. Place the clickable region inside EntityCardBody, which renders as a <button> so it is keyboard-focusable. Within it, EntityCardHeader lays out the gauge/icon + title column + value on one row; EntityCardMeters stacks compact metric rows below. Use EntityCardControls for any interactive controls that should sit outside the click area.

<EntityCard>
  <EntityCardBody onClick={() => router.push('/devices/wallbox')}>
    <EntityCardHeader>
      <EntityCardIcon icon={EvStation} tone="warning" />
      <EntityCardTitleColumn>
        <EntityCardTitle>Garage wallbox</EntityCardTitle>
        <EntityCardState tone="success">Charging ยท 11 kW</EntityCardState>
        <EntityCardDetail>32 min remaining</EntityCardDetail>
      </EntityCardTitleColumn>
      <EntityCardValue>11 kW</EntityCardValue>
    </EntityCardHeader>
  </EntityCardBody>
  <EntityCardFooter>Scheduled to finish at 18:30</EntityCardFooter>
</EntityCard>

Examples

The footer is a status strip pinned to the bottom edge of the card. Omit it when you don't have status to show.

API Reference

Compose with the helper parts:

ComponentRole
EntityCardBodyClickable region (<button>) that vertically stacks children
EntityCardHeaderHorizontal row inside the body: gauge/icon + title + value
EntityCardIconRounded square icon tile (use when no SOC gauge)
EntityCardTitleColumnMiddle column wrapper that stacks title, state, detail
EntityCardTitleBold entity name
EntityCardStateColored dot + status label
EntityCardDetailMuted supporting line below the state
EntityCardValueRight-aligned prominent number (e.g. "4.4 kW")
EntityCardMetersCompact metric rows section below the header
EntityCardControlsNon-clickable controls strip below the body (mode, toggles)
EntityCardFooterBottom strip with a divider (optional status)

Accessibility

EntityCard itself is a non-interactive container. Put the primary action on EntityCardBody, which renders as a <button> โ€” give it an accessible name (aria-label or visible title text). Keep interactive controls (EntityCardControls) outside the body so nested buttons are not inside the clickable region. EntityCardIcon glyphs are decorative; convey status through EntityCardState text, not color alone.

On this page