Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Examples

Below are links to Codesandbox instances for examples of how to use this repo. Feel free to fork these sandboxes and play around with this library's features. If you have any examples of cool uses of this library, submit a PR to add one!

Basic Usage

Basic functionality of the timeline, included panning, zooming and rendering of items

Example Codesandbox

Item Moving and Resizing

Moving and Resizing examples. Clicking and dragging can move items into different groups. Notice the handleItemMove and handleItemResize handlers passed to the Timeline.

Example Codesandbox

Custom Item Rendering

The itemRenderer component allows you to customize what contents are shown in the item on the calendar.

Example Codesandbox

Restricting Item Moving and Resizing

You can restrict the moving and resizing of items at the item level by providing a canMove and canResize property with an item.

Example Codesandbox

Right Sidebar

Adding a right sidebar is as easy as passing rightSidebarWidth. Content in the right column is populated from the rightTitle property on the group.

Note: If you are using Custom Headers then you need to add them with SidebarHeader with variant "right"

Example Codesandbox

Linked Timelines

By managing the the visibleStartTime and visibleEndTime for multiple timelines, you can syncronize scroll across multiple timelines.

Example Codesandbox

Tree Groups

Through group manipulation, you can achieve tree group views.

Example Codesandbox

Note that this is the user code manipulating groups to achieve tree group functionality. This example is an illustration of how you can achieve this functionality. This is not a feature that is directly supported by the library.

Controlled scroll

Controlled visible port of the calendar using visibleTimeStart and visibleTimeEnd. This also limits scrolling by mouse and adds two buttons to change the visible port of the calendar

Example Codesandbox

Programmatically Scrolling

Using controlled scroll and react-spring to trigger scrolling and create an animation.

Example Codesandbox

Sticky header

Using Timeline Header you can make the header stick to the top of the page while scrolling down

Example Codesandbox

InfoLabel

Native info label was removed with 0.26.0 and now the responsibility to render to render the Info Label is on the user. The example bellow has InfoLabel that matches exactly the removed label

Example Codesandbox