Hey developers! ๐
Get ready to take your timeline experiences to the next level! We're thrilled to announce the latest release of React Chrono, packed with a host of exciting new features, performance enhancements, and developer experience improvements. If you're building interactive, engaging timelines in your React applications, you're going to love these updates.
React Chrono has always aimed to make beautiful, responsive timelines easy to create. With the new release, we've listened to your feedback and pushed the boundaries further. Let's dive into what's new!
๐ Enhanced Search Functionality: Find Events in a Flash
Navigating through extensive timelines is now smoother and more intuitive than ever. Our revamped search functionality is designed for speed and usability.
โจ Key Features:
- ๐ Smart & Performant: Search queries are debounced, ensuring a fluid experience without performance hiccups
- ๐ค Case-Insensitive Matching: Finds what users are looking for, regardless of casing
- โจ๏ธ Keyboard Navigation: Easy cycling through search results using keyboard shortcuts
- ๐พ Persistent Search State: Search query remains active during navigation
๐ป Implementation Example
import { Chrono } from 'react-chrono';
import myTimelineItems from './items'; // Your timeline items
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={myTimelineItems}
mode="VERTICAL_ALTERNATING"
// ๐ฏ Search is built into the toolbar by default!
// No special props needed - just start typing in the search box
/>
</div>
);
export default App;
๐ Search Features:
- ๐ Built-in search box in the timeline toolbar
- โก 150ms debounce (with 500ms maxWait) for smooth performance
- ๐ค Case-insensitive search across titles and content
- โจ๏ธ Keyboard navigation: Enter to go to next result, Escape to clear search
- ๐ฏ Automatic highlighting of matching timeline items
This makes your timelines more accessible and user-friendly, especially for data-rich scenarios.
๐ Comprehensive Dark Mode Support: Style It Your Way
Dark mode is no longer just a trend; it's a user expectation. React Chrono's new release introduces a vastly improved dark mode experience with deep customization.
๐จ Enhanced Dark Mode Features:
- ๐๏ธ 15+ Configurable Properties: Tailor every aspect of the dark theme
- ๐ Automatic System Preference Detection: Seamlessly adapts to user's OS-level color scheme
- โจ Smooth Transitions: Elegant animated transitions when switching themes
๐จ Custom Dark Theme Example
import { Chrono, Theme } from 'react-chrono';
import myTimelineItems from './items';
const customDarkTheme: Theme = {
primary: '#00bfff', // ๐ต Vibrant blue for accents
secondary: '#888888', // ๐ Lighter grey for secondary elements
cardBgColor: '#2c2c2c', // ๐ Darker card background
cardForeColor: '#f5f5f5', // ๐ก Light text on cards
titleColor: '#00bfff', // ๐ Title color matching primary
titleColorActive: '#ffffff', // โญ Active title color
iconColor: '#00bfff', // ๐ฏ Icon accent color
// ... and many more properties to explore!
};
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={myTimelineItems}
mode="VERTICAL_ALTERNATING"
theme={customDarkTheme} // ๐จ Apply your custom theme
enableDarkToggle={true} // ๐ Enable dark mode toggle button
/>
</div>
);
export default App;
๐ฑ๏ธ Improved User Experience: Intuitive Interactions
React Chrono's new release introduces several UX enhancements to make timeline interaction more intuitive and accessible:
๐ UX Enhancement Features:
- โจ๏ธ Enhanced Keyboard Navigation: Navigate through timeline items using arrow keys for better accessibility
- ๐ฏ Smooth Scrolling: Refined scrolling behavior with improved inertia and snap points
- ๐ฑ Responsive Controls: Timeline controls automatically adapt to different screen sizes and orientations
- ๐ก Tooltips & Visual Cues: Helpful tooltips and visual indicators to guide users through interactions
๐ฎ Customized Controls Example
import { Chrono } from 'react-chrono';
import myTimelineItems from './items';
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={myTimelineItems}
mode="VERTICAL_ALTERNATING"
enableQuickJump={true} // ๐ฏ Enable outline for easier navigation
disableNavOnKey={false} // โจ๏ธ Enable keyboard navigation
allowDynamicUpdate={true} // ๐ Allow dynamic updates to timeline
highlightCardsOnHover={true} // โจ Highlight cards on mouse hover
/>
</div>
);
export default App;
These improvements make React Chrono timelines more accessible and user-friendly, resulting in a smoother experience across devices.
โจ Advanced Animation System: Bring Your Timelines to Life
Engage your users with smoother, more dynamic timeline presentations.
๐ญ Animation Features:
- ๐จ Built-in Animation Types: Choose from
reveal
,slide_in
, andslide_from_sides
animations - ๐ฏ Mode-Specific Defaults: Animations are automatically optimized for different timeline modes:
- ๐ฑ VERTICAL: Uses
reveal
animation with subtle scale and opacity transitions - ๐ VERTICAL_ALTERNATING: Uses
slide_from_sides
with directional sliding effects - โก๏ธ HORIZONTAL: Uses
slide_in
animation with smooth top-to-bottom transitions
- ๐ฑ VERTICAL: Uses
- โฑ๏ธ Slideshow Integration: Smooth 0.5s animation duration with ease-in-out timing
๐ฌ Slideshow Configuration Example
import { Chrono } from 'react-chrono';
import myTimelineItems from './items';
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={myTimelineItems}
mode="VERTICAL_ALTERNATING"
slideShow={true} // ๐ฅ Enable slideshow mode
slideItemDuration={3000} // โฐ 3 seconds per slide
slideShowType="slide_from_sides" // ๐ฏ Optional: override default animation
/>
</div>
);
export default App;
๐ Animation Types Available:
- ๐ญ reveal: Scale and fade-in effect (default for VERTICAL mode)
- โ๏ธ slide_in: Slide from top (default for HORIZONTAL mode)
- โ๏ธ slide_from_sides: Directional sliding (default for VERTICAL_ALTERNATING mode)
๐ Nested Timeline Support: For Complex Narratives
Sometimes, a single layer isn't enough. React Chrono's new release introduces the ability to nest timelines within timeline cards, perfect for:
๐ Use Cases:
- ๐ Detailed project breakdowns (phases containing tasks)
- ๐ In-depth historical accounts (eras containing specific events)
- ๐ Multi-layered storytelling
๐ณ Nested Timeline Structure Example
// In your items.ts or similar
const parentItems = [
{
title: "Q1 2025: Project Alpha Launch",
cardDetailedText: "Overview of the Project Alpha initiative and its successful launch.",
// ๐ฏ Define nested timeline items using the 'items' property
items: [
{
title: "Jan: Kick-off",
cardDetailedText: "Initial planning and team assembly."
},
{
title: "Feb: Development Sprint 1",
cardDetailedText: "Core features developed."
},
{
title: "Mar: UAT & Launch",
cardDetailedText: "User testing and go-live."
}
]
},
// ... more parent items
];
// In your App.tsx
import { Chrono } from 'react-chrono';
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={parentItems}
mode="VERTICAL_ALTERNATING"
nestedCardHeight={120} // ๐ Optional: control height of nested timeline cards
/>
</div>
);
export default App;
๐ This powerful feature opens up new possibilities for presenting complex, hierarchical information. The nested timelines are automatically detected when timeline items contain an items
array property.
๐ผ๏ธ Improved Media Handling: Better Alignment and Display
Displaying images and videos in your timelines now offers more control over layout and presentation.
๐จ Media Enhancement Features:
- ๐ Media Alignment: Control how media content is positioned within timeline cards
- ๐ผ๏ธ Media Fit: Configure how media content should fit within its container (similar to CSS object-fit)
๐ธ Media Configuration Example
import { Chrono } from 'react-chrono';
import itemsWithMedia from './itemsWithMedia'; // Your items with media objects
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={itemsWithMedia}
mode="VERTICAL"
mediaSettings={{
align: 'center', // ๐ 'left', 'right', or 'center'
fit: 'cover' // ๐ผ๏ธ 'cover', 'contain', 'fill', or 'none'
}}
/>
</div>
);
export default App;
๐ Available Options:
-
Alignment:
left
|right
|center
-
Fit:
cover
|contain
|fill
|none
โก๏ธ Significant Performance Optimizations: Smooth Sailing for Large Datasets
We've dived deep under the hood to make React Chrono faster and more memory-efficient, especially when dealing with a large number of timeline items.
๐ Performance Enhancements:
- ๐ฏ Outline Virtualization: Timeline outline items are virtualized to improve performance with many timeline points
- ๐ง Memory Leak Fixes: More robust cleanup of event listeners and internal states
- ๐ Optimized Re-renders: Reduced unnecessary component updates
- ๐ฆ Smaller Bundle Size: Continued efforts to keep the library lean
๐ Large Dataset Optimization Example
import { Chrono } from 'react-chrono';
import veryLargeDataset from './veryLargeDataset'; // 1000+ items
const App = () => (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={veryLargeDataset}
mode="VERTICAL"
scrollable={{ scrollbar: true }} // ๐ Enable scrolling for long content
enableQuickJump={true} // ๐ฏ Enable quick navigation for large datasets
/>
</div>
);
export default App;
๐ฏ Users with extensive timelines will notice a significant improvement in responsiveness and load times, particularly in the timeline outline navigation.
๐ ๏ธ Developer Experience Enhancements: Build Better, Faster
We care about your productivity and the robustness of your applications.
๐จโ๐ป Developer Experience Features:
- ๐ Enhanced TypeScript Support: More comprehensive and accurate type definitions for props, theme objects, item models, and internal structures
- ๐ Better Autocompletion: Improved IDE integration with better type checking and fewer runtime errors
- ๐จ Improved Error Handling: More descriptive error messages and graceful degradation when issues occur
๐ป TypeScript Integration Example
import { Chrono, TimelineItemModel, TimelineMode, Theme } from 'react-chrono';
// ๐ฏ Fully typed timeline items
const typedItems: TimelineItemModel[] = [
{
title: "Event 1",
cardTitle: "My Card Title",
cardSubtitle: "A subtitle",
cardDetailedText: "Detailed information here...",
media: {
type: "IMAGE",
source: { url: "https://via.placeholder.com/300" }
}
// ๐ TypeScript will help ensure 'type' is a valid media type, etc.
},
// ... more items
];
const App: React.FC = () => {
// ๐ Typed callback functions
const handleItemSelected = (item: {
title?: string;
cardTitle?: string;
cardSubtitle?: string;
cardDetailedText?: string | string[];
index: number;
}) => {
console.log("Selected item:", item);
};
return (
<div style={{ width: "100%", height: "95vh" }}>
<Chrono
items={typedItems}
mode={"VERTICAL_ALTERNATING" as TimelineMode}
onItemSelected={handleItemSelected} // ๐ฏ Fully typed event handlers
enableDarkToggle={true}
parseDetailsAsHTML={true}
/>
</div>
);
};
export default App;
๐ TypeScript Benefits:
- ๐ Better autocompletion in your IDE
- ๐จ Compile-time error detection
- ๐ Comprehensive prop validation
- ๐ฏ Type-safe event handlers
๐ Migrating to the Latest Release
Upgrading is straightforward! React Chrono's new release maintains backward compatibility for most existing APIs.
๐ฆ Installation Steps
- Update your dependency:
npm install react-chrono@latest
# or
yarn add react-chrono@latest
# or
pnpm update react-chrono@latest
๐ฏ Enable New Features: Most new features are opt-in via new props (as shown in the examples above). Your existing timelines should continue to work as before.
๐ Review Documentation: Check the updated documentation for any specific migration notes if you were using highly customized internal aspects.
โ ๏ธ Migration Notes
- โ Backward Compatible: Existing code should work without changes
- ๐ New Props: All new features are opt-in via new props
- ๐ TypeScript: Enhanced type definitions may require minor type adjustments
๐ Get Started with React Chrono Today!
React Chrono's latest release is more than just an update; it's a significant step forward in making timeline creation a joy for developers and a delight for users. With enhanced search, deep dark mode customization, intuitive user interactions, nested timelines, new animations, and massive performance gains, there's never been a better time to use React Chrono.
We're incredibly excited to see what you build with these new capabilities! ๐
๐ Resources & Links
๐ Documentation & Examples:
- ๐ GitHub Repository: https://github.com/prabhuignoto/react-chrono
- ๐ Official Documentation: https://react-chrono.prabhumurthy.com/
- ๐ฆ NPM Package: https://www.npmjs.com/package/react-chrono
๐ฌ Community & Support
Have feedback or built something cool? Share it with the community or open an issue on GitHub!
Happy Timeline Building! ๐โจ
๐ Summary of New Features
โ
Enhanced Search - Find timeline events instantly with intelligent search
๐ Dark Mode - Comprehensive theming with 15+ customizable properties
๐ฑ๏ธ Better UX - Improved interactions, keyboard navigation, and accessibility
โจ Animations - Three built-in animation types with mode-specific defaults
๐ Nested Timelines - Support for complex, hierarchical timeline structures
๐ผ๏ธ Media Controls - Better alignment and display options for images/videos
โก Performance - Optimized rendering and virtualization for large datasets
๐ ๏ธ Developer Experience - Enhanced TypeScript support and error handling
๐ก Note: All prop names and configurations in examples are verified against the actual React Chrono source code. Always refer to the official documentation for the most up-to-date information.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.