Skip to content
Get started

Components

EventCard

Unstable: a launch, a live session or a booking, a date block, the title, when and where, and who is going. Import it from @nizivo/react/unstable/event-card.

Server component, no client JSUnstable

Examples

Basic

A live drop: the date block, the time and place, and who is going. timeZone keeps the server's date and the browser's the same.

Autumn collection live drop

18:00 – 19:00 · Instagram Livegoing
import type { JSX } from 'react';
import { Avatar, AvatarGroup } from '@nizivo/react/avatar';
import { EventCard } from '@nizivo/react/unstable/event-card';

export function EventCardExample(): JSX.Element {
  return (
    <div style={{ maxInlineSize: 440 }}>
      <EventCard
        title="Autumn collection live drop"
        date="2026-11-16T18:00:00Z"
        timeZone="UTC"
        when="18:00 – 19:00 · Instagram Live"
        attendees={
          <AvatarGroup total={7} size="md">
            <Avatar name="Maya Rao" />
            <Avatar name="Jonah Okafor" />
            <Avatar name="Priya Raman" />
          </AvatarGroup>
        }
      />
    </div>
  );
}

Import

import { EventCard } from '@nizivo/react/unstable/event-card';

// Once per app (Getting started), after
// @nizivo/tokens/tokens.css and @nizivo/react/css/base.css
import '@nizivo/react/css/event-card.css';

Static or interactive

Server. No client JavaScript. How to choose.

The date

date is a Date or an ISO 8601 string. The block shows the weekday and the day; it is presentational, and the full date is a <time datetime> read with the details. locale formats it and timeZone sets the zone: pass one, so the server's date and the browser's agree.

Content

title is the card's heading (headingLevel, 3 by default), when the time and place, and attendees who is going, best an AvatarGroup, followed by "going".

Props

Server component Renders data-slot="event-card" with the class nz-event-card. Props: EventCardProps. Source: src/unstable/event-card/event-card.tsx.

NameTypeDefaultDescription
attendeesReactNode–

Who is going: an AvatarGroup.

daterequiredDate | string–

When it starts: a Date, or an ISO 8601 string.

headingLevel2 | 3 | 4 | 5 | 63

The title's level.

labelsPartial<EventCardLabels>–
localestring'en-US'

BCP 47 tag for the date.

renderRenderProp<Record<string, never>>–

Must render an <article>.

timeZonestringthe runtime's

The IANA time zone to show the date in.

titlerequiredReactNode–

What it is: "Autumn collection live drop".

whenReactNode–

The time and place: "18:00 – 19:00 · Instagram Live".

  • Also takes every attribute of <article> except title. (Omit<ComponentPropsWithRef<"article">, "title">)

render takes an element, or, in client code, a function of the props and no state.

Other exports

EventCardLabels type

import type { EventCardLabels } from '@nizivo/react/unstable/event-card'

EventCard's own strings (§16.4): serialisable, English defaults.

NameTypeDefaultDescription
goingrequiredstring'going'

After the attendees.

EventCardProps type

import type { EventCardProps } from '@nizivo/react/unstable/event-card'

The props of EventCard, listed above.

Data attributes and slots

Style parts by class (.nz-<slot>) and state by data attribute. Attribute meanings come from contracts/vocabulary.json.

SlotRendered byData attributes
event-card
.nz-event-card
EventCard
root (takes render)
none
event-card-title
.nz-event-card-title
EventCard
inner element (CSS only)
none

CSS hooks

Set a hook on the component's class or any ancestor to restyle it without specificity games; leave it unset for the default shown.

This stylesheet reads no public hook.

Layers: nz.components. Classes: .nz-event-card, .nz-event-card-date, .nz-event-card-day, .nz-event-card-details, .nz-event-card-icon, .nz-event-card-month, .nz-event-card-people, .nz-event-card-title, .nz-event-card-when.

Tokens this stylesheet reads (20)

--nz-bg-brand, --nz-bg-surface, --nz-border-subtle, --nz-border-width-default, --nz-font-body-s, --nz-font-heading-h1, --nz-font-label-l, --nz-font-label-s, --nz-radius-lg, --nz-radius-xl, --nz-space-1, --nz-space-1-5, --nz-space-10, --nz-space-2, --nz-space-4, --nz-text-on-brand, --nz-text-primary, --nz-text-secondary, --nz-tracking-heading-h1, --nz-tracking-label-l

Accessibility

Nothing in this component takes focus or keyboard input.

Keyboard

None.

On this page