Calm motion: animations on this site only fade, with no movement
Return request
Pick the items and the reason for a return, then see the refund
Lets a buyer send back items from an order. The refund updates while the buyer picks the items.
Basic
itemsis the list of items in the order. Each item has anid, aname, thequantitythat the buyer bought, thepriceof one, and an optionalimage.- Each item has a native check box. A checked item goes back in full. If the buyer bought more than one, a menu lets them send back fewer.
reasonsis the list of reasons in the menu. The default has four reasons.- If no item or no reason is chosen, the button shows an error that screen readers hear at once. The reason menu is then marked as not valid.
- A good request emits
submitwith the items and their quantities, the reason, and the note. currencyis an ISO 4217 code (defaultUSD), andlocalesets the format.- Change the words with
labelsor a label pack:items,reason,pick,note,refund,submit,missing, andquantity(a function). The reasons are your own text.
Usage
ts
import { BlessReturnRequest } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
items* | BlessReturnItem[] | — | |
reasons | string[] | ["Damaged or broken", "Not as described", "Wrong item", "No longer needed"] | the reasons to choose from |
currency | string | "USD" | |
locale | string | "en" | |
labels | Partial<{ items: string; quantity: (name: string) => string; reason: string; pick: string; note: string; refund: string; submit: string; missing: string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
submit | [payload: BlessReturnPayload] |