Thread
A conversation's scroll area: follows new messages, lets go when you scroll up, and brings you back with one button.
Message 1
Message 2
Message 3
Message 4
Message 5
Message 6
Message 7
Message 8
Message 9
Message 10
Message 11
Message 12
When to use
- Use when
- The scroll area of a conversation that grows over time, following new messages until the reader scrolls up.
- Avoid when
- A static list that never grows; use a normal scroll area.
Installation
The source lands in src/components/ui/thread.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Built on
- Packages
@stylexjs/stylex- Figma
- Optional native Figma library. See Designers.
Verified
- Size
- 2.9 kB gzipped on its own, 11 kB with the Shelf items and packages it builds on. JS and CSS in a production build, without React.
- Accessibility
- Axe passes on 5 stories
- Behavior
- 5 interaction tests in Storybook
- Rendering
- Parent re-renders skip its consumers
- React Doctor
- React Doctor finds nothing