Skip to content
+

Event Timeline - Resources

Define the properties of your events.

Define resources

Use the resources prop to define the list of resources the events can be associated to and the resource property on the event model to link an event to its resource:

const event = [
  { resource: 'work' /** other properties */ },
  { resource: 'holidays' /** other properties */ },
];

const resources = [
  { name: 'Work', id: 'work' },
  { name: 'Holidays', id: 'holidays' },
];

<EventTimelinePremium events={events} resources={resources} />;

Nested resources

Use the children property to create hierarchical resource structures:

const resources = [
  {
    id: 'engineering',
    title: 'Engineering',
    children: [
      {
        id: 'frontend',
        title: 'Frontend',
        children: [
          { id: 'web-app', title: 'Web App' },
          { id: 'mobile-app', title: 'Mobile App' },
        ],
      },
    ],
  },
];
Resource title
Sun, Jun 29 - Sat, Jul 5
Sun, Jul 6 - Sat, Jul 12
Sun, Jul 13 - Sat, Jul 19
Sun, Jul 20 - Sat, Jul 26
Sun, Jul 27 - Sat, Aug 2
Sun, Aug 3 - Sat, Aug 9
Sun, Aug 10 - Sat, Aug 16
Sun, Aug 17 - Sat, Aug 23
Sun, Aug 24 - Sat, Aug 30
Sun, Aug 31 - Sat, Sep 6
Sun, Sep 7 - Sat, Sep 13
Sun, Sep 14 - Sat, Sep 20
Sun, Sep 21 - Sat, Sep 27
Sun, Sep 28 - Sat, Oct 4
Sun, Oct 5 - Sat, Oct 11
Sun, Oct 12 - Sat, Oct 18
MUI X Expired package version

Visible resources

Use the defaultVisibleResources prop to initialize the visible resources. A resource is visible if not in the object or if set to true.

Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version

Resource properties

Color

Use the eventColor property to define a resource's color. Here is the list of all the available color palettes:

Resource title

Jul

Aug

MUI X Expired package version

Drag interactions

Use the areEventsDraggable property to prevent dragging a resource's events to another point in time:

const resource = {
  // ...other properties
  areEventsDraggable: false,
};

Use the areEventsResizable property to prevent resizing a resource's events by dragging their start or end edge:

const resource = {
  // ...other properties
  areEventsResizable: false,
  areEventsResizable: "start" // only the start edge is draggable.
  areEventsResizable: "end" // only the end edge is draggable.
};

Read-only

Use the areEventsReadOnly property to mark all events of a resource as read-only:

const resource = {
  // ...other properties
  areEventsReadOnly: true,
};

Resource column label

Use the resourceColumnLabel prop to customize the header of the resource column:

Team
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version

Store data in custom properties

Use the resourceModelStructure prop to define how to read properties of the resource model when they don't match the model expected by the components:

const resourceModelStructure = {
  title: {
    getter: (resource) => resource.name,
  },
};

function Timeline() {
  return (
    <EventTimelinePremium
      resources={[{ name: 'Resource 1' /** ... */ }]}
      resourceModelStructure={resourceModelStructure}
    />
  );
}
Resource title
2025
Jul
Aug
Sep
Oct
Nov
Dec
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2027
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2028
Jan
Feb
Mar
Apr
May
Jun
MUI X Expired package version