Skip to content
WunderUI

Agenda Event

Free

One row of a schedule: start and end time, a colour bar, a title with details, guests and a menu.

npx wunderui-cli add agenda-event

Playground

09:0009:15
Zoom
NL
DO
PR
+1
11:3012:30
Room Aurora
NL
DO
PR
15:0015:45
Google Meet
NL
DO

Click an event or open its menu.

Installation

bash
npx wunderui-cli add agenda-event

Writes the source into your project with its dependencies and, on first use, the styles - see Installation.

Then import what you need:

tsx
import {
  AgendaEvent,
  AgendaEventChip,
  EventChip,
} from "@/components/blocks/data"
import type { AgendaEventProps } from "@/components/blocks/data"

Then use it:

tsx
import { AgendaEvent } from "@/components/ui/agenda-event"

export function Event({ onOpen }: { onOpen: () => void }) {
  return (
    <div className="rounded-xl border border-border bg-card [&>*:first-child]:rounded-t-xl [&>*:last-child]:rounded-b-xl [&>*:last-child]:border-b-0">
      <AgendaEvent start="11:30" end="12:30" title="Design review" meta="Room Aurora" color="purple" onClick={onOpen} />
    </div>
  )
}

Expected result: You should see one row with the time 11:30 over 12:30, a purple bar, the title Design review and the room below it. Hover or Tab to it, then press Enter to open it.

When to use

Use Agenda Event for

  • A day or week schedule where an entry opens its details
  • Meeting lists that show who is invited
  • Event rows with a menu for edit, duplicate or delete

Use something else for

  • Agenda for a plain read-only list of times and titles
  • Calendar for a month grid, where an event shows as a small chip
  • Timeline for events that already happened, with a status and an exact date

Colour

Eight hues for the bar next to the title, purple by default. Use them to tell kinds of events apart, and name the kind in the text as well.

11:3012:30
Design reviewRoom Aurora

Content

A row needs a start and a title. Add an end time, a details line and guests, and long text is cut to one line while a long guest list becomes a count.

11:3012:30
Design reviewRoom Aurora

Interaction

A row is static text until you give it a click handler, which makes the whole row one button, or a menu handler, which adds a menu button at the end.

11:3012:30
Room Aurora
NL
DO
PR

Click an event or open its menu.

Chip

AgendaEventChip is the compact form of an event: a 24 px label with a coloured bar and the title, for a day cell of a month grid where the full AgendaEvent row does not fit. color takes the same eight colours; hover mixes a little of the text colour into the tint, and disabled dims once. It is a button that forwards button props, so a Popover or Menu trigger can render it. It replaces EventChip.

24

Click an event.

States

A clickable row fills on hover and shows an indigo border with a 2 px ring when the keyboard focuses it.

11:3012:30
Room Aurora
NL
DO
PR

Keyboard interactions

A clickable row has one Tab stop for the title and one for the menu button; a row without a click handler has none.

TaborShiftTab
Moves focus to the next or previous button: the title of a clickable row, then its menu button.
EnterorSpace
On the title, calls and opens the event. On the menu button, calls and does not open the event.

Arrow keys do not move focus between rows. Each button is a separate Tab stop.

Behavior and motion

What the row does with its press target, content, the DOM and motion.

One press target
With a click handler the whole row opens the event, by pointer or keyboard. Without one the row is static: no pointer cursor, no hover fill, no tab stop.
Hover and focus
A clickable row fills light grey on hover. When the title has keyboard focus, the whole row gets an indigo border and a lighter 2 px ring.
The menu does not open the event
The menu button sits above the title and stops the click, so it never opens the event. The row opens no menu itself: open yours from the menu handler and anchor it to the button.
Guests
Guests overlap with a ring in the card colour. The first three show and the rest become a +N count; a guest shows a photo if given, otherwise initials.
One line each
The title wraps to two lines, the detail line stays on one, and the time column keeps 64 px. On a narrow row the guests and menu wrap below the title.
Line below
Every row draws a line below it. Wrap rows in a bordered, rounded container, remove the last line, and don't clip the container: the focus ring would be cut off.
Colours are fixed
Eight colours: indigo, blue, purple, pink, red, orange, yellow, green. There is no custom colour, and purple is the default.
Plain markup
A row is a plain div, not a list item, so give the list a heading nearby. The bar has no text; name the event kind in the title or detail line.
Motion and reduced motion
The row adds no animation: the hover fill and the focus ring change at once. There is nothing to reduce.

Anatomy

The parts the row is made of, numbered in the figure.

11:3012:30
Room Aurora
NL
DO
PR
  • data-slot="agenda-event"

    One schedule row with a line below it. With a click handler the title becomes a button stretched over the whole row, with a hover fill and a focus ring.

  • The start time above an optional end time, in a fixed 64 px column, printed as written.

  • Optional

    A 3 px bar in the event colour (one of eight, purple by default). It is always shown.

  • The title, up to two lines, then an ellipsis. With a click handler it is a native button named by the title.

  • Optional

    A line under the title in smaller tertiary text, such as the room or call link. Cut to one line.

  • data-slot="avatar-group"Optional

    Overlapping avatars: the first three, then a +N count for the rest.

  • Optional

    A small icon button named Event menu, shown when a menu handler is set. It sits above the stretched title, so clicking it does not open the event.

  • data-slot="agenda-event-meta"Optional
  • data-slot="agenda-event-chip"Optional

    The compact form of an event for a day cell of a month grid: a 24 px label with a 3 px coloured bar and the truncated title. It is a button, so a Popover or Menu trigger can render it. It replaces EventChip.

  • Optional

Best practices

  • Do

    Pass a click handler instead of wrapping the row in a link or button. The title becomes a real button over the whole row, and the menu button stays reachable.

  • Do

    Keep the title short and put the place or call details on the line below it.

  • Do

    Give every guest a name. It becomes the avatar's hover title and the source of the initials when there is no photo.

  • Do

    Put rows in a bordered, rounded container with the last line removed and the outer corners rounded. Each row draws its own line below, so the last one would double the border.

  • Don’t

    Don't let the colour bar carry the meaning alone. It has no text, so name the kind of event in the title or detail line too.

  • Don’t

    Don't add overflow-hidden to the container. It clips the focus ring, which is drawn outside the row.

  • Don’t

    Don't put buttons or links inside the title or detail line. The title is already a button, and a control inside a button is invalid HTML; use the menu for extra actions.

  • Do

    Pass wrap where the meta line or the title runs long (phones): nothing is clamped or truncated.

API reference

Agenda Event is a plain row. It takes the props below and passes nothing else to its element. AgendaEventChip also takes every attribute of a button, such as onClick, disabled and aria-haspopup.

One schedule row with a line below it. With a click handler the title becomes a button stretched over the whole row, with a hover fill and a focus ring.

PropTypeDefaultDescription
start requiredReact.ReactNode—The start time, shown in the first line of the time column. Printed as written, so format it yourself, for example .
endReact.ReactNode—The end time, shown under the start time in smaller, lighter text. Leave it out for an event without a fixed end.
title requiredReact.ReactNode—The name of the event, up to two lines, then an ellipsis. With it is the label of the row's button, so write it as plain text.
metaReact.ReactNode—A second line under the title, in smaller tertiary text, for the room, the call link or the organiser. Truncated to one line.
color"indigo" | "blue" | "purple" | "pink" | "red" | "orange" | "yellow" | "green""purple"The hue of the bar next to the title: , , , , , , or . Use it to tell kinds of events apart, and say the kind in the text as well.
guests{ name: string; initials?: string; src?: string; color?: AvatarColor }[]—The people invited. The first three are shown as overlapping avatars, the rest as a count. is the hover title, replaces the ones taken from the name, shows a photo and sets the avatar colour.
onClick() => void—Called when the row is pressed or its title button is activated. Setting it makes the title a button over the whole row and adds the hover fill and the focus ring.
onMenu() => void—Called when the button is pressed. Setting it shows the button at the right end of the row. It does not trigger ; open your own menu from here.
classNamestring—Extra classes for the row, merged after the defaults, for example to remove the line below with .
wrapbooleanfalseThe title and the meta line wrap onto more lines instead of clamping (title, 2 lines) and truncating (meta). Default: false.

The compact form of an event for a day cell of a month grid: a 24 px label with a 3 px coloured bar and the truncated title. It is a button, so a Popover or Menu trigger can render it. It replaces EventChip.

PropTypeDefaultDescription
color"indigo" | "blue" | "purple" | "pink" | "red" | "orange" | "yellow" | "green""indigo"One of the eight event colours. Indigo by default.

PropTypeDefaultDescription
color"indigo" | "blue" | "purple" | "pink" | "red" | "orange" | "yellow" | "green"—

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

MCPget_component("agenda-event")
Installnpx wunderui-cli add agenda-event

The full library index for assistants is at /llms.txt.