Booting Environment...

Magnetic

A magnetic effect that smoothly attracts elements to the mouse cursor based on configurable physics and proximity ranges.

Installation

npx raya-ui@latest add magnetic

File Structure

your-project
components
ui
magnetic
Magnetic.vue

API Reference

Props

intensity
number
0.6

Strength of the magnetic attraction. A value between 0 and 1 is recommended.

range
number
100

Pixel radius around the element where the magnetic effect becomes active.

actionArea
enum
"self"

Defines the hover trigger area boundary. Accepts 'self' (default), 'parent' (container), or 'global' (always active).

Vue component created & ported by the author of Raya UI.

Original concept by Motion Primitives

Settings
0.30
150