hooks

use-element-width

ResizeObserver on a ref — returns the element's content width in pixels. Updates live as the element resizes.

Loading…

Resize the window — the width updates live via ResizeObserver. (ClientOnly.)

Installation

import from @workspace/ui module-owned, not registry-installable

Usage