Skip to main content

ArtistCard

Planned

Performer/artist card — circular image, name, role, follow button. Used in event detail and artist pages.

Categorymolecules
Sourcepatterns/molecules/artistcard.html
AI HintPlanned molecule — no React component exists yet (not exported from the barrel). Display card for artist/performer profiles: circular avatar + name + role/genre + optional follow CTA. Use on event lineup sections, artist listings, search results. NOT a SelectionCard variant: SelectionCard is a picker-confirmation card; ArtistCard is a display card. Data prerequisite: the public events API currently returns {id, profile_id, display_name, position} only — image/role/href require a backend join with ep_profile before adoption.

Performer/artist card — circular image, name, role, follow button. Used in event detail and artist pages.

ArtistCard

Display molecule (planned)

Performer/artist card: circular avatar, name (links to the artist page), role line and a follow toggle.

Design reference mock — not a rendered component.

Status

Planned molecule — the React component is not yet implemented. Nothing is exported from the DS barrel; the render above is a design reference mock typed to the planned interface, not the component.

Planned API

Sketch of the intended contract. Until the component ships, this is not importable code.

interface ArtistCardProps {
  id: string;
  name: string;
  role: string;
  image: { url: string; alt: string };
  href: string;
  isFollowing?: boolean;
  onFollowToggle?: () => void;
}

// Sketch — ArtistCard is planned and NOT exported from the barrel yet.
<ArtistCard
  id="marie-tremblay"
  name="Marie Tremblay"
  role="Vocals • Jazz"
  image={{ url: '/artists/marie.webp', alt: 'Portrait of Marie Tremblay' }}
  href="/artists/marie-tremblay"
  isFollowing={false}
  onFollowToggle={() => follow('marie-tremblay')}
/>

When to use

  • Lineup sections in event detail pages.
  • Search results filtered by artist.
  • Dedicated artist profile pages.

Accessibility

Planned contract (no implementation exists to audit yet): the avatar is a real <img> whose alt text comes from image.alt (WCAG 1.1.1); the follow toggle is a <button aria-pressed={isFollowing}> whose visible label reflects the state (Follow / Following) per WCAG 4.1.2 (Name, Role, Value); the card root is an <article> (implicit role="article"); the follow button keeps a 44×44px tap target (--ep-tap-min) per WCAG 2.5.5.

Props

Prop
Type
Default
Description
id*
string
—

Stable artist identifier (consumed by the follow handler).

name*
string
—

Artist display name.

role*
string
—

Role / instrument / genre line (e.g. “Vocals • Jazz”).

image*
{ url: string; alt: string }
—

Circular avatar — URL plus alt text (alt is required by the a11y contract).

href*
string
—

Link to the artist page (wraps the name).

isFollowing
boolean
false

Whether the current user already follows this artist.

onFollowToggle
() => void
—

Follow/unfollow handler; the button exposes aria-pressed={isFollowing}.

Props

Preview

ArtistCard

Prop
Type
Required
Default
Description
id
string
Required
—

Stable artist identifier (backend row id).

name
string
Required
—

Artist display name (already localized by the caller).

role
string
Required
—

Role / instrument / genre line (e.g. 'Voix • Jazz'). Translated by the caller.

image
{ url: string; alt: string }
Required
—

Circular avatar image. alt MUST be provided in the user's locale (WCAG 1.1.1).

href
string
Required
—

Link to the artist profile page.

isFollowing
boolean
Optional
false

Whether the current user already follows this artist; drives follow-button state.

onFollowToggle
() => void
Optional
—

Follow/unfollow handler. When omitted the follow button is not rendered.

Quick use:<ArtistCard />

Accessibility

ARIA rolearticle

Type

1 rule

NASA Rule 5

id, name, role, image, href all required

ARIA

1 rule

WCAG 1.1.1, 4.1.2

Image alt required; follow button has aria-pressed

a11y

1 rule

WCAG 2.5.5

Follow button tap target >= 44x44px (--ep-tap-min)

Usage

Import

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

Example 1

tsxSnippet
<ArtistCard id={a.id} name={a.name} role={a.role} image={a.image} href={`/artists/${a.slug}`} isFollowing={a.followed} onFollowToggle={() => toggle(a.id)} />

Anti-patterns

— Do not hardcode artist names/roles — accept them as props (caller translates)

— Do not render the follow button without onFollowToggle

— Do not use a div onClick for the card link — anchor or button semantics only

Design System v4.1.0 | ePassLive