@stianlarsen/react-light-beam 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,15 @@
1
-
2
1
  # @stianlarsen/react-light-beam
3
2
 
4
3
  [![npm version](https://badge.fury.io/js/%40stianlarsen%2Freact-light-beam.svg)](https://badge.fury.io/js/%40stianlarsen%2Freact-light-beam)
5
4
 
6
5
  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.
7
6
 
7
+ ## Preview
8
+
9
+ ![LightBeam Component](https://github.com/Stianlars1/react-light-beam/blob/5422cdc60ae7ab6b52d644d452646bec7212f76f/lightBeam.png)
10
+
11
+ _A preview of @stianlarsen/react-light-beam_
12
+
8
13
  ## Installation
9
14
 
10
15
  ```bash
@@ -20,8 +25,8 @@ yarn add @stianlarsen/react-light-beam
20
25
  ## Usage
21
26
 
22
27
  ```jsx
23
- import { LightBeam } from '@stianlarsen/react-light-beam';
24
- import 'your-css-file.css'; // Include the necessary styles
28
+ import { LightBeam } from "@stianlarsen/react-light-beam";
29
+ import "your-css-file.css"; // Include the necessary styles
25
30
 
26
31
  const App = () => {
27
32
  return (
@@ -45,15 +50,15 @@ export default App;
45
50
 
46
51
  ### Props
47
52
 
48
- | Prop Name | Type | Default Value | Description |
49
- |---------------------|-----------|--------------------------------|-------------------------------------------------------------------------------------------------|
50
- | `id` | `string` | `undefined` | Optional string representing a unique ID for the LightBeam container. |
51
- | `className` | `string` | `undefined` | Optional string representing custom classes to be added to the LightBeam container. |
52
- | `colorLightmode` | `string` | `rgba(0,0,0, 0.5)` | Optional string representing the color of the light beam in light mode. |
53
- | `colorDarkmode` | `string` | `rgba(255, 255, 255, 0.5)` | Optional string representing the color of the light beam in dark mode. |
54
- | `fullWidth` | `number` | `1.0` | Optional number between `0` and `1` representing the maximum width the light beam can reach. |
55
- | `maskLightByProgress` | `boolean` | `false` | If `true`, the `mask-image`'s linear gradient will start with the chosen color at 0% and the transparent part starting at 50%. As the user scrolls, it will dynamically change to have the transparent part at 95%, reducing the glow effect. If `false`, it will default to `linear-gradient(to bottom, chosenColor 25%, transparent 95%)`. |
56
- | `invert` | `boolean` | `false` | Optional boolean to invert the scroll progress calculation. |
53
+ | Prop Name | Type | Default Value | Description |
54
+ | --------------------- | --------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
55
+ | `id` | `string` | `undefined` | Optional string representing a unique ID for the LightBeam container. |
56
+ | `className` | `string` | `undefined` | Optional string representing custom classes to be added to the LightBeam container. |
57
+ | `colorLightmode` | `string` | `rgba(0,0,0, 0.5)` | Optional string representing the color of the light beam in light mode. |
58
+ | `colorDarkmode` | `string` | `rgba(255, 255, 255, 0.5)` | Optional string representing the color of the light beam in dark mode. |
59
+ | `fullWidth` | `number` | `1.0` | Optional number between `0` and `1` representing the maximum width the light beam can reach. |
60
+ | `maskLightByProgress` | `boolean` | `false` | If `true`, the `mask-image`'s linear gradient will start with the chosen color at 0% and the transparent part starting at 50%. As the user scrolls, it will dynamically change to have the transparent part at 95%, reducing the glow effect. If `false`, it will default to `linear-gradient(to bottom, chosenColor 25%, transparent 95%)`. |
61
+ | `invert` | `boolean` | `false` | Optional boolean to invert the scroll progress calculation. |
57
62
 
58
63
  ### Default Configuration
59
64
 
@@ -78,7 +83,7 @@ Example:
78
83
 
79
84
  ```jsx
80
85
  <div className="container">
81
- <LightBeam className="lightBeam"/>
86
+ <LightBeam className="lightBeam" />
82
87
  </div>
83
88
  ```
84
89
 
@@ -88,7 +93,7 @@ And in your CSS or SCSS:
88
93
  .container {
89
94
  position: relative;
90
95
  z-index: 1;
91
-
96
+
92
97
  .lightBeam {
93
98
  position: absolute;
94
99
  inset: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stianlarsen/react-light-beam",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "A customizable React component that creates a light beam effect using conic gradients. Supports dark mode and various customization options.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",