useItem
Last updated
Last updated
A hook to declare a timeline item.
Use this hook to declare an HTML element as an item in the timeline.
id
A unique id to identify this item.
span
An object representing the start and end values of the item.
disabled?
An optional boolean to disable the interactivity of the item.
data?
Custom data that can be passed to the row.
🧠This can be passed to rows to identify their type. This type can later be used in the event callbacks to apply different behaviors to different row types.
useItem can also receive callbacks, that will be called when the relevant event is triggered.
For example:
itemStyle
Basic style properties that must be passed to the item wrapper element.
itemContentStyle
Basic style properties that must be passed to the item's children wrapper element.
All of dnd-kit api are returned as well.