Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stianlarsen/react-light-beam

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stianlarsen/react-light-beam

A customizable React component that creates a light beam effect using conic gradients. Supports dark mode and various customization options.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

@stianlarsen/react-light-beam

npm version

A customizable React component that creates a light beam effect using conic gradients. The component is fully responsive and supports both light and dark modes. Ideal for adding dynamic and engaging visual elements to your web applications.

Installation

npm install @stianlarsen/react-light-beam

or

yarn add @stianlarsen/react-light-beam

Usage

import { LightBeam } from "@stianlarsen/react-light-beam";
import "your-css-file.css"; // Include the necessary styles

const App = () => {
  return (
    <div className="your-container-class">
      <LightBeam
        className="your-lightbeam-class"
        colorDarkmode="hsl(var(--primary) / 1)"
        colorLightmode="hsl(var(--foreground) / 0.2)"
        fullWidth={0.8}
      />
      <YourContentHere />
    </div>
  );
};

export default App;

Props

Prop NameTypeDefault ValueDescription
classNamestringundefinedOptional string representing custom classes to be added to the LightBeam container.
colorLightmodestringrgba(0,0,0, 0.5)Optional string representing the color of the light beam in light mode.
colorDarkmodestringrgba(255, 255, 255, 0.5)Optional string representing the color of the light beam in dark mode.
fullWidthnumber1.0Optional number between 0 and 1 representing the maximum width the light beam can reach.

Customization

You can customize the appearance and behavior of the light beam by adjusting the props or by applying additional styles via the className prop.

Dark Mode Support

The component automatically adjusts between light and dark modes based on the user's system preferences. You can pass different colors for light and dark modes using the colorLightmode and colorDarkmode props.

Example

<LightBeam
  className="custom-lightbeam"
  colorDarkmode="hsl(210, 22%, 18%)"
  colorLightmode="hsl(0, 0%, 98%)"
  fullWidth={0.5}
/>

License

MIT © Stian Larsen

Keywords

FAQs

Package last updated on 28 Aug 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc