JSPM

svelte-lookat

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q25194F
  • License MIT

Make div follow mouse/face, phone gyro support, for svelte.

Package Exports

  • svelte-lookat
  • svelte-lookat/LookAt.svelte

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svelte-lookat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

LookAt

Creates a div which makes all it's children follow the mouse cursor or the user's face when using a mobile phone. Passes all props into the created div. Change follow intensity with intensity prop.

Usage:

import LookAt from 'svelte-lookat'

<LookAt class="w-full d-flex justify-content-center align-items-center" on:mousemove={handleMove} intensity={0.5}>
  <div class="w-full d-flex">
    text!
  </div>
</LookAt>