Description
Users building public-facing timelines need ways to share specific views or export static images for presentations, social media, or embedding in articles.
Use Case
After building an NFL history timeline, I want to share a view focused on "Super Bowl I through X" as an image on social media, or generate a link that opens the timeline centered on a specific date with specific zoom level.
Proposed Solution
- Add
onExport prop that provides export utilities
- Support formats: PNG, SVG, and shareable URL with state encoded
- Provide
getShareableUrl() method that encodes current view state (center date, zoom, filters)
- Add optional export button via
showExportButton prop
Example API
const timelineRef = useRef();
<Timeline
ref={timelineRef}
data={data}
showExportButton={true}
/>
// Programmatic access
timelineRef.current.exportAsImage('png');
timelineRef.current.getShareableUrl(); // Returns URL with encoded state
Issue generated from user feedback while building an NFL history timeline
Description
Users building public-facing timelines need ways to share specific views or export static images for presentations, social media, or embedding in articles.
Use Case
After building an NFL history timeline, I want to share a view focused on "Super Bowl I through X" as an image on social media, or generate a link that opens the timeline centered on a specific date with specific zoom level.
Proposed Solution
onExportprop that provides export utilitiesgetShareableUrl()method that encodes current view state (center date, zoom, filters)showExportButtonpropExample API
Issue generated from user feedback while building an NFL history timeline