Booting Environment...

Gravity Stars

An interactive particle field that simulates gravitational pull or repulsion based on mouse proximity. Built with high-performance Canvas rendering.

Installation

npx raya-ui@latest add gravity-stars

File Structure

your-project
components
ui
gravity-stars
GravityStars.vue

API Reference

Props

starsCount
number
75

The density of the star field. Higher values increase CPU usage.

mouseInfluence
number
100

The radius (in pixels) around the cursor where physics forces are applied.

gravityStrength
number
50

The intensity of the gravitational force.

mouseGravity
enum
"attract"

Determines physics behavior. attract pulls stars in; repel pushes them away.

Gravity

Move your mouse to interact

Settings
100
200px
50