Skip to main content

useItemPosition

Hook that returns the absolute position of the widget on the dashboard.

Returns

The ItemPosition of the widget.

Example

src/widgets/example/Example.tsx
import React from 'react'
import {useItemPosition} from '@modbros/dashboard-sdk'

export default function Example() {
const {x, y} = useItemPosition()

return null
}