Marker: Sticky dates
With sticky, a marker stays at the top of its scroll area. Once it sticks, its lines fade and the label turns into a floating pill so it stays readable over messages. Put each day in its own section so the next date pushes the previous one away.
This adds the example as components/examples/marker/sticky.tsx, together with the Marker component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/marker-sticky.jsonTo add only the component, follow the Marker installation.
Props in this example
The Marker props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "separator" | "border" | "default" |
stickyStick to the top of the scroll area and become a pill while stuck. | boolean | false |
| Prop | Type | Default |
|---|---|---|
dateRequired. Anything new Date() accepts. | Date | string | number | – |
Every prop is in the Marker API reference.
See them all, with keyboard support and accessibility notes, on the Marker page.
- AttachmentFile and image cards for uploads, with progress, states, actions, a full-card trigger and names that keep their extension.
- BubbleChat message bubbles with variants, grouped corners, reactions and room for interactive content.
- MessageA chat message row with an avatar, name, bubbles and status, where new messages rise in from the sender's side.
- Message scrollerA chat scroll area that follows new messages, keeps your place while you read back, and counts what you missed on the jump button.