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.
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 Livegoingimport 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.
| Name | Type | Default | Description |
|---|---|---|---|
attendees | ReactNode | – | Who is going: an AvatarGroup. |
daterequired | Date | string | – | When it starts: a Date, or an ISO 8601 string. |
headingLevel | 2 | 3 | 4 | 5 | 6 | 3 | The title's level. |
labels | Partial<EventCardLabels> | – | |
locale | string | 'en-US' | BCP 47 tag for the date. |
render | RenderProp<Record<string, never>> | – | Must render an |
timeZone | string | the runtime's | The IANA time zone to show the date in. |
titlerequired | ReactNode | – | What it is: "Autumn collection live drop". |
when | ReactNode | – | The time and place: "18:00 – 19:00 · Instagram Live". |
- Also takes every attribute of
<article>excepttitle. (Omit<ComponentPropsWithRef<"article">, "title">)
render takes an element, or, in client code, a function of the props and no state.
Other exports
EventCardLabelstypeimport type { EventCardLabels } from '@nizivo/react/unstable/event-card'EventCard's own strings (§16.4): serialisable, English defaults.
Name Type Default Description goingrequiredstring'going'After the attendees.
EventCardPropstypeimport 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.
| Slot | Rendered by | Data attributes |
|---|---|---|
event-card.nz-event-card | EventCardroot (takes render) | none |
event-card-title.nz-event-card-title | EventCardinner 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.