Review and feedback
A product review form with a large star rating, a counted textarea, highlight tags with suggestions, and a photo drop zone.
bunx --bun @getweini/cli@latest add alert avatar button card file-upload input rating tags-input textareaCustomize
- The block is controlled. Set `loading` while your request runs, `sent` after it succeeds, and `error` with a message when it fails. It emits `submit` with `{ rating, headline, body, highlights, photos }` once the rating and review length pass.
- Rating is the focal point: a `lg` Rating with a word for the current value beside it. The word is decorative because the Rating already announces “3 of 5 stars”; change the wording in `copy.ratingWords`.
- TagsInput holds the highlights (Enter adds, Backspace removes, paste splits on commas). The suggestion buttons call the same array, so a tag added either way is validated by the same limit of five.
- FileUpload only collects `File` objects; uploading them is yours. Its `accept` rule applies to both the picker and drag and drop, and rejected files never reach the model.
- Errors show after the first submit, are linked with `aria-describedby`, and focus moves to the first invalid control. Pass `minLength` to change the review rule and `copy` to translate every string, including the upload messages.