Skip to content

useViewportKind ​

useViewportKind() returns simple responsive flags used by 4B Pen editor UI.

Use it when your shell needs a light abstraction over breakpoints instead of wiring useBreakpoints() directly.

Usage ​

ts
import { useViewportKind } from '@open-pencil/vue'

const { isMobile, isDesktop } = useViewportKind()

Returns ​

  • isMobile
  • isDesktop

Released under the MIT License.