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
v-model:openopens and closes the dialog. Each time it opens, the form is empty.subjectis what the reader reports, for the title, such as "this comment" (default "this post").reasonsis 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
reportwith 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
labelsor a label pack:why,note,send,cancel,missing,thanks,thanksBody,close, andtitle(a function). The reasons are your own text.
Usage
ts
import { BlessReportDialog } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
subject | string | "this post" | what is reported, for the title, for example "this post" |
reasons | string[] | [
"Spam",
"Harassment or hate",
"Violence or danger",
"False information",
"Something else",
] | the reasons to choose from |
labels | Partial<{ title: (subject: string) => string; why: string; note: string; send: string; cancel: string; missing: string; thanks: string; thanksBody: string; close: string; }> | — | |
open | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:open | [value: boolean] | |
report | [reason: string, note: string] |