Skip to content

feat: let a timeline marker show rich content on hover - #54

Merged
karngyan merged 1 commit into
mainfrom
feat/marker-preview
Oct 7, 2026
Merged

karngyan merged 1 commit into
mainfrom
feat/marker-preview

Conversation

@karngyan

@karngyan karngyan commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

A marker can now have a preview: any React content. When you hover a marker that has one, the hover card shows that content in place of the time and the label.

  • The card is full size (no 0.72 scale), left-aligned, and up to 300px wide (or the scrubber width, if smaller).
  • It keeps the same position logic: it follows the marker and never crosses the track edges. A card wider than the track is centred on it.
  • It still sits above icon markers.
  • label stays the marker button's accessible name, so hosts should set both.
  • pointer-events: none stays.

Markers without preview look and behave as before.

Includes tests (preview shown, label path unchanged, aria-label still from label, preview above an icon), a README note and a minor changeset.

🤖 Generated with Claude Code

A marker can now carry a preview (any React content). When the hovered
marker has one, the hover card shows it in place of the time and label.
The card is then full size, left-aligned and up to 300px wide, and it
still stays inside the track and above icon markers. The label stays
the marker button's accessible name.

Markers without a preview look and behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karngyan
karngyan merged commit bc616b5 into main Oct 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant