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

Report dialog ​

Report a post or a person, with a reason and a note

Lets a reader tell the moderators about harmful content. It opens in a modal from a menu or a button.

Basic

Report this comment

Why do you report it?
  • v-model:open opens and closes the dialog. Each time it opens, the form is empty.
  • subject is what the reader reports, for the title, such as "this comment" (default "this post").
  • reasons is the list of reasons. Each reason is a native radio button. The default list has five reasons.
  • If no reason is chosen, the form shows "Pick a reason." Screen readers hear it at once, and the group is marked as not valid.
  • A good report emits report with the reason and the note. Then the dialog thanks the reader and says that the person does not see who reported it.
  • Change the words with labels or a label pack: why, note, send, cancel, missing, thanks, thanksBody, close, and title (a function). The reasons are your own text.

Usage ​

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

API ​

Props

NameTypeDefaultDescription
subjectstring"this post"what is reported, for the title, for example "this post"
reasonsstring[][ "Spam", "Harassment or hate", "Violence or danger", "False information", "Something else", ]the reasons to choose from
labelsPartial<{ title: (subject: string) => string; why: string; note: string; send: string; cancel: string; missing: string; thanks: string; thanksBody: string; close: string; }>—
openbooleanfalse

Events

NamePayloadDescription
update:open[value: boolean]
report[reason: string, note: string]

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