Pointer Type

The pointer type store holds the type of the user’s device pointer.

It can be one of the following values:

  • null: The pointer type is unknown
  • mouse: The user has a mouse or a trackpad
  • touch: The user has a touch screen
  • pen: The user has a pen or a stylus
  • game: The user has a game pointer device (e.g. a wiimote, a kinect, etc.)

Example

You are currently using a unknown pointer device.

Sources

+page.svelte

<script lang="ts">
  import { pointerType } from 'louisette'
</script>

<p>
  You are currently using a <code>{$pointerType || 'unknown'}</code> pointer device.
</p>