@stianlarsen/react-light-beam 1.0.3 → 1.0.4

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 +21 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,17 @@
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
 
5
+ ![Preview / example image](https://github.com/Stianlars1/react-light-beam/blob/5422cdc60ae7ab6b52d644d452646bec7212f76f/lightBeam.png)
6
+
6
7
  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
8
 
9
+ ## Preview
10
+
11
+ ![LightBeam Component](https://github.com/Stianlars1/react-light-beam/blob/5422cdc60ae7ab6b52d644d452646bec7212f76f/lightBeam.png)
12
+
13
+ _A preview of @stianlarsen/react-light-beam_
14
+
8
15
  ## Installation
9
16
 
10
17
  ```bash
@@ -20,8 +27,8 @@ yarn add @stianlarsen/react-light-beam
20
27
  ## Usage
21
28
 
22
29
  ```jsx
23
- import { LightBeam } from '@stianlarsen/react-light-beam';
24
- import 'your-css-file.css'; // Include the necessary styles
30
+ import { LightBeam } from "@stianlarsen/react-light-beam";
31
+ import "your-css-file.css"; // Include the necessary styles
25
32
 
26
33
  const App = () => {
27
34
  return (
@@ -45,15 +52,15 @@ export default App;
45
52
 
46
53
  ### Props
47
54
 
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. |
55
+ | Prop Name | Type | Default Value | Description |
56
+ | --------------------- | --------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `id` | `string` | `undefined` | Optional string representing a unique ID for the LightBeam container. |
58
+ | `className` | `string` | `undefined` | Optional string representing custom classes to be added to the LightBeam container. |
59
+ | `colorLightmode` | `string` | `rgba(0,0,0, 0.5)` | Optional string representing the color of the light beam in light mode. |
60
+ | `colorDarkmode` | `string` | `rgba(255, 255, 255, 0.5)` | Optional string representing the color of the light beam in dark mode. |
61
+ | `fullWidth` | `number` | `1.0` | Optional number between `0` and `1` representing the maximum width the light beam can reach. |
62
+ | `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%)`. |
63
+ | `invert` | `boolean` | `false` | Optional boolean to invert the scroll progress calculation. |
57
64
 
58
65
  ### Default Configuration
59
66
 
@@ -78,7 +85,7 @@ Example:
78
85
 
79
86
  ```jsx
80
87
  <div className="container">
81
- <LightBeam className="lightBeam"/>
88
+ <LightBeam className="lightBeam" />
82
89
  </div>
83
90
  ```
84
91
 
@@ -88,7 +95,7 @@ And in your CSS or SCSS:
88
95
  .container {
89
96
  position: relative;
90
97
  z-index: 1;
91
-
98
+
92
99
  .lightBeam {
93
100
  position: absolute;
94
101
  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.4",
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",