Attachment: Stress
Hostile names in a narrow column, a random state every 60 ms, and 200 items in one group. Nothing overflows and the layout holds.
This adds the example as components/examples/attachment/stress.tsx, together with the Attachment component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/attachment-stress.jsonTo add only the component, follow the Attachment installation.
Props in this example
The Attachment props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
state | "idle" | "uploading" | "processing" | "error" | "done" | "done" |
progress0 to 100. Shown only while uploading, and clamped to that range. | number | – |
size | "default" | "sm" | "xs" | "default" |
Every prop is in the Attachment API reference.
See them all, with keyboard support and accessibility notes, on the Attachment page.
- Aspect ratioA box that holds its shape before media loads, shimmers while loading, fades the media in and falls back when it fails.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- ProgressA bar or ring that shows how far a task has come, eases between updates and slides while the total is unknown.
- Scroll areaNative scrolling with a minimal scrollbar, edges that fade only where there’s more to see, and an optional peek that cuts the last item in half.
- BubbleChat message bubbles with variants, grouped corners, reactions and room for interactive content.