Skip to content
Calm motion: animations on this site only fade, with no movement

RSVP ​

Going, maybe, or not going, with counts and faces

Asks a person if they come to an event, and shows how many others come. The faces of some people who go show under the buttons. For a question with your own answers, use the poll.

Basic
41 going
  • v-model is the answer of the reader: yes, maybe, no, or none. A second click on the chosen answer clears it.
  • counts gives the answers of the other people, without the reader. The answer of the reader adds one to its count. So, if the reader changes the answer, the numbers stay right. Send each change to your server.
  • going is a list of some of the people who go, each with a name and an optional src. They show as an avatar group. If the reader goes, "you" comes first.
  • label is the question, such as the name of the event, and it names the group of buttons.
  • Each answer is a toggle button with aria-pressed, and the chosen one is filled. Change the words with labels or a label pack: yes, maybe, no, question, you, and goingCount (a function of the count).

Usage ​

ts
import { BlessRsvp } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
countsPartial<Record<BlessRsvpAnswer, number>>{}the answers of the other people, without the reader
goingBlessAvatarGroupItem[][]some of the people who go, for the faces
labelstring—the question, for example the name of the event
labelsPartial<Record<BlessRsvpAnswer, string> & { question: string; you: string; goingCount: (n: number) => string; }>—
modelValueBlessRsvpAnswer—the answer of the reader; a second click on it clears it

Events

NamePayloadDescription
update:modelValue[value: BlessRsvpAnswer | undefined]

Released under the MIT License. Character names and artwork belong to their owners.