Tooltip
The<Tooltip> component wraps <Gantt> as a container and shows a floating tooltip when the user hovers over a task bar. By default it displays the task name. Pass a custom content component to render richer information.
Import
Basic usage (default tooltip)
Wrap<Gantt> with <Tooltip> and wire up the same api instance:
text field in a small floating label.
Props
The Gantt API instance. Used to look up full task objects when the cursor moves over a task bar. Obtain it from the
init callback or a ref on <Gantt>.Custom React component rendered inside the tooltip popup. Receives the full
ITask object for the hovered task as the data prop. When omitted, the default tooltip displays the task’s text field.The content to wrap — typically the
<Gantt> component. Mouse-move events within this subtree trigger tooltip positioning.Custom tooltip template
Create a component that accepts{ data: ITask } and returns your custom markup:
The
data prop passed to your content component is null when the cursor is not over a task bar (for example when hovering over an empty timeline cell). Guard against null before reading task properties.Tooltip positioning
The<Tooltip> component tracks the cursor position via onMouseMove on its container and positions the floating tooltip relative to the hovered element. The tooltip is automatically clamped to stay within the visible area of the container.
Fullscreen
The<Fullscreen> component wraps any content and adds a toggle button in the bottom-right corner that expands the content to fill the browser viewport using the native Fullscreen API. An optional keyboard shortcut can also trigger the toggle.
Fullscreen is exported from @svar-ui/react-gantt via the TypeScript type definitions. In runtime builds it is re-exported from the @svar-ui/react-core package. If the named import doesn’t resolve, import directly from core: import { Fullscreen } from '@svar-ui/react-core'.Import
Props
Keyboard shortcut string that toggles fullscreen mode, for example
'ctrl+shift+f'. When omitted, fullscreen can only be toggled via the icon button. The shortcut listener is attached globally when the component mounts.The content to render inside the fullscreen container. Typically a
<Gantt> component, optionally combined with a <Toolbar> or other companions.Usage
Esc or clicking the icon again exits fullscreen.