PanArea
The PanArea
component provides layout and interactions for a pannable zone of the design experience.
The parent of the PanArea
is responsible for responding to the user's panning events (e.g. right clicking and dragging) via the panOffsetChange
prop and passing in the new panOffset
.
name | type | required | comment |
---|---|---|---|
children | ReactNode | ReactNode[] | yes | |
panOffset | { x: number; y: number } | yes | The current offset from the top-left of the pan container. |
panOffsetChange | (value: { x: number; y: number }) => void | yes | |
allowUserPan | boolean | no | Enable or disable the user's ability to change the pan offset with a click and drag. Default value: true |
animateOnPan | boolean | no | Whether to use a CSS transition to update the pan offset. Default value: false |
ariaLabel | string | no | |
className | string | no | |
onAnimationEnd | () => void | no | |
panTransitionDuration | number | no | Duration in milliseconds of the transition from the old pan offset to the new one. Default value: 500 |
panTransitionTiming | string | no | The Default value: 'ease-in-out' |
registerPanContainer | (element: HTMLDivElement) => void | no | |
role | AriaRole | no | |
style | CSSProperties | no |
Result
Loading...
Live Editor