useOrientation
Screen orientation angles and type.
1.1 KB
•Updated on September 3, 2026
Installation
Bash
pnpm dlx shadcn@latest add @spaceui/hooks-browser-use-orientationUsage
Code
import { useOrientation } from '@/hooks/use-orientation'
const { angle, type } = useOrientation()API Reference
Parameters / Props
None
Return Value
| Property | Type | Description |
|---|---|---|
angle | number | Angle in degrees. |
type | string | 'portrait-primary', etc. |