New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vue-godrays

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-godrays

A stunning God Rays effect component for Vue applications

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

Vue GodRays Component 🌟

GodRays Effect Demo

A stunning and customizable God Rays (Light Rays) effect component for Vue applications. Create atmospheric lighting effects with ease, perfect for adding dramatic flair to your web projects.

This component is a Vue implementation inspired by and based on the original Framer University Light Rays component. Special thanks to Framer University for their excellent original work.

✨ Features

  • 🎨 Multiple color modes (single, multi, random)
  • ⚡ Smooth animation controls
  • 🎛️ Fully customizable rays (count, reach, intensity)
  • 📱 Responsive design
  • 🎯 Precise positioning control
  • 🎨 Custom background color support

📦 Installation

npm install vue-godrays
# or
yarn add vue-godrays

🚀 Quick Start

<template>
  <GodRays
    :animation="{ animate: true, speed: 1 }"
    :raysColor="{ mode: 'single', color: '#ffffff' }"
    :intensity="0.8"
    :rays="20"
  />
</template>

<script>
import { GodRays } from "vue-godrays";

export default {
  components: {
    GodRays,
  },
};
</script>

🎮 Props

PropTypeDefaultDescription
animationObject{ animate: true, speed: 1 }Controls animation state and speed
raysColorObject{ mode: 'single', color: '#ffffff' }Defines ray coloring mode and colors
backgroundColorstring'#000000'Background color of the component
intensitynumber0.7Intensity of the rays (0.0 - 1.0)
raysnumber15Number of light rays
reachnumber1How far the rays extend
positionnumber50Center position of rays (0 - 100)
radiusstring'50%'Radius of the light source
styleObject{}Additional CSS styles

🎨 Color Modes

The component supports three color modes through the raysColor prop:

  • Single Color Mode
:raysColor="{ mode: 'single', color: '#ffffff' }"
  • Multi Color Mode
:raysColor="{
  mode: 'multi',
  color1: '#ff0000',
  color2: '#00ff00'
}"
  • Random Color Mode
:raysColor="{ mode: 'random' }"

🎯 Examples

Basic Usage

<GodRays
  :animation="{ animate: true, speed: 1 }"
  :raysColor="{ mode: 'single', color: '#ffffff' }"
  :intensity="0.8"
  :rays="20"
/>

Dramatic Effect

<GodRays
  :animation="{ animate: true, speed: 0.5 }"
  :raysColor="{ mode: 'multi', color1: '#ff0000', color2: '#ffd700' }"
  :intensity="1"
  :rays="30"
  :reach="1.5"
  backgroundColor="#000000"
/>

Subtle Background Effect

<GodRays
  :animation="{ animate: true, speed: 0.3 }"
  :raysColor="{ mode: 'single', color: '#4a90e2' }"
  :intensity="0.4"
  :rays="15"
  :reach="0.8"
  backgroundColor="rgba(0,0,0,0.8)"
/>

🛠️ TypeScript Support

The component includes full TypeScript support with the following interface:

export interface GodRaysProps {
  animation?: {
    animate: boolean;
    speed: number;
  };
  raysColor?: {
    mode: "single" | "multi" | "random";
    color?: string;
    color1?: string;
    color2?: string;
  };
  backgroundColor?: string;
  intensity?: number;
  rays?: number;
  reach?: number;
  position?: number;
  radius?: string;
  style?: Record<string, string | number>;
}

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📝 License

MIT License - feel free to use this component in your projects!

🙏 Credits

  • Original concept and design by Framer University
  • Vue implementation developed with ❤️ by Liam Robinson

If you find this component useful, please consider giving it a ⭐️ on GitHub!

Keywords

vue

FAQs

Package last updated on 21 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts