Passer au contenu principal

SelectionCard

Implemented

Shows the entity a picker has selected, with a divided action rail on the trailing edge. Use when a chosen value needs confirming (two venues can share a name) or acting on (edit, clear). Composes Surface.

Categorymolecules
Sourcepatterns/molecules/selectioncard.html
AI HintUse after a picker resolves to one entity and the user must confirm or act on it. Put IconButtons in `actions`; they render in a divided trailing rail.

Shows the entity a picker has selected, with a divided action rail on the trailing edge.

SelectionCard

Form & Choice — Family 3

Chosen-entity card: title, supporting details, optional leading media and a divided trailing action rail. Composes Surface.

Foufounes Électriques
Foufounes Électriques
87 Rue Sainte-Catherine E, Montréal, QC H2X 1K5
Foufounes Électriques
87 Rue Sainte-Catherine E, Montréal, QC H2X 1K5 — a deliberately long second line of supporting detail that must truncate instead of pushing the divided action rail off the card

Usage

Use SelectionCard after a picker resolves to one entity and the user must confirm they picked the right one (two venues can share a name) or act on it (edit, clear). A bare label in the input cannot do either. Put IconButtons in actions — they render in the divided trailing rail and keep their 44px tap targets; the card itself is a display container with no interactive role.

import { SelectionCard, IconButton } from '@epasslive/design-system'

<SelectionCard
  title="Foufounes Électriques"
  media={<Avatar /* … */ />}
  actions={
    <>
      <IconButton ariaLabel={t('editVenue')} icon={<Pencil />} variant="ghost" size="sm" />
      <IconButton ariaLabel={t('clearVenue')} icon={<X />} variant="ghost" size="sm" />
    </>
  }
>
  <div className="text-ep-xs text-ep-text-muted">
    87 Rue Sainte-Catherine E, Montréal, QC H2X 1K5
  </div>
</SelectionCard>

Props

Prop
Type
Default
Description
title*
React.ReactNode
—

Primary line — the chosen entity's name.

children
React.ReactNode
—

Supporting lines under the title.

actions
React.ReactNode
—

Controls in the divided trailing rail, typically IconButtons.

media
React.ReactNode
—

Leading slot — thumbnail, avatar or icon.

className
string
—

Extra classes on the root Surface.

id
string
—

Forwarded to the root.

Props

Preview

SelectionCard

Prop
Type
Required
Default
Description
title
React.ReactNode
Required
—

Primary line — the chosen entity's name.

children
React.ReactNode
Optional
—

Supporting lines under the title.

actions
React.ReactNode
Optional
—

Controls in the divided trailing rail, typically IconButtons.

media
React.ReactNode
Optional
—

Leading slot — thumbnail, avatar or icon.

className
string
Optional
—

Extra classes on the root Surface.

id
string
Optional
—

Forwarded to the root.

Quick use:<SelectionCard />

Accessibility

layout

1 rule

DS-CORR-08-FIX7

body is min-w-0 flex-1 so long content truncates instead of pushing the action rail out

composition

1 rule

DS Cardinal Rule 1

composes Surface; does not redeclare border/radius/background

Usage

Import

tsxSnippet
import { SelectionCard } from "@epasslive/design-system"

Example 1

tsxSnippet
<SelectionCard title="Foufounes Électriques" />

Example 2

tsxSnippet
<SelectionCard title="Venue" actions={<IconButton />} />
Design System v4.1.0 | ePassLive