beautiful-backgrounds 0.0.6 → 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +47 -76
- package/build/bb.es.js +3038 -0
- package/build/bb.es.js.map +1 -0
- package/build/bb.js +9 -0
- package/build/bb.js.map +1 -0
- package/build/index.d.ts +7 -0
- package/build/src/BeautifulBackground.d.ts +25 -0
- package/build/src/Particle.d.ts +53 -0
- package/build/src/Symbol.d.ts +7 -0
- package/build/src/components/ambientRibbon.d.ts +25 -0
- package/{dist/components/DigitalRain.d.ts → build/src/components/digitalRain.d.ts} +15 -11
- package/build/src/components/hexagonWave.d.ts +29 -0
- package/build/src/components/liquidLines.d.ts +24 -0
- package/build/src/components/neonRails.d.ts +31 -0
- package/build/src/components/startTrail.d.ts +33 -0
- package/build/src/stories/AmbientRibbon.stories.d.ts +16 -0
- package/build/src/stories/DigitalRain.stories.d.ts +13 -0
- package/build/src/stories/HexagonWave.stories.d.ts +19 -0
- package/build/src/stories/LiquidLines.stories.d.ts +17 -0
- package/build/src/stories/NeonRails.stories.d.ts +20 -0
- package/build/src/stories/StartTrail.stories.d.ts +20 -0
- package/build/src/utils/color.d.ts +2 -0
- package/build/src/utils/function.d.ts +1 -0
- package/build/src/utils/lit.d.ts +2 -0
- package/{dist → build/src}/utils/number.d.ts +0 -1
- package/build/vite.svg +1 -0
- package/package.json +53 -27
- package/dist/beautiful-backgrounds.min.js +0 -1
- package/dist/components/BeautifulBackground.d.ts +0 -28
- package/dist/components/BeautifulBackground.js +0 -110
- package/dist/components/DigitalRain.js +0 -72
- package/dist/components/Particle.d.ts +0 -18
- package/dist/components/Particle.js +0 -44
- package/dist/components/StarTrail.d.ts +0 -30
- package/dist/components/StarTrail.js +0 -95
- package/dist/components/Symbol.d.ts +0 -9
- package/dist/components/Symbol.js +0 -20
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/utils/color.d.ts +0 -1
- package/dist/utils/color.js +0 -7
- package/dist/utils/number.js +0 -20
- package/dist/utils/object.js +0 -9
- /package/{dist → build/src}/utils/object.d.ts +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 by Stefan Nieke
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Beautiful Backgrounds
|
|
2
2
|
|
|
3
3
|
[![Build][build-badge]][build]
|
|
4
|
+
[![Coverage][coverage-badge]][coverage]
|
|
5
|
+
[![Npm][npm-badge]][npm]
|
|
6
|
+
[](https://niekes.github.io/beautiful-backgrounds/)
|
|
7
|
+
<a href="https://github.com/niekes/beautiful-backgrounds"><img src="https://img.shields.io/github/stars/niekes/beautiful-backgrounds" alt="stars" /></a>
|
|
8
|
+
<a href="https://github.com/sponsors/niekes"><img src="https://img.shields.io/badge/sponsor-30363D?logo=GitHub-Sponsors&logoColor=#EA4AAA" alt="sponsor this project" /></a>
|
|
4
9
|
|
|
5
10
|
The "Beautiful Backgrounds" library offers a collection of customizable web components designed to enhance web pages with visually appealing animated backgrounds. Easy to integrate and use, these components are perfect for adding dynamic and interactive elements to your web applications.
|
|
6
11
|
|
|
@@ -8,9 +13,9 @@ The "Beautiful Backgrounds" library offers a collection of customizable web comp
|
|
|
8
13
|
|
|
9
14
|
## Features
|
|
10
15
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
16
|
+
- **Multiple Background Components**: A variety of background components, each offering unique visual effects.
|
|
17
|
+
- **Customizable and Interactive**: Each component comes with customizable properties to suit different design needs.
|
|
18
|
+
- **Responsive and Efficient**: Components are responsive to screen size changes and optimized for performance.
|
|
14
19
|
|
|
15
20
|
## Installation
|
|
16
21
|
|
|
@@ -21,99 +26,65 @@ npm i beautiful-backgrounds --save
|
|
|
21
26
|
```
|
|
22
27
|
|
|
23
28
|
```js
|
|
24
|
-
import { BbStarTrail } from
|
|
29
|
+
import { BbStarTrail } from "beautiful-backgrounds";
|
|
25
30
|
```
|
|
26
31
|
|
|
27
32
|
In browsers with [`esm.sh`][esmsh]:
|
|
28
33
|
|
|
29
34
|
```html
|
|
30
35
|
<script type="module">
|
|
31
|
-
|
|
36
|
+
import { BbStarTrail } from "https://esm.sh/beautiful-backgrounds";
|
|
32
37
|
</script>
|
|
33
38
|
```
|
|
34
39
|
|
|
35
40
|
## Usage
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
The best way to explore all the possibilities, interactive controls, and properties for each background is through our [Storybook](https://niekes.github.io/beautiful-backgrounds/). It provides a real-time environment to tweak parameters and see the results instantly.
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
<bb-star-trail
|
|
41
|
-
data-num-stars="567"
|
|
42
|
-
data-star-size-min="0.1"
|
|
43
|
-
data-star-size-max="1.5"
|
|
44
|
-
data-star-speed-min="0.001"
|
|
45
|
-
data-star-speed-max="0.003"
|
|
46
|
-
data-star-color-hue-start="30"
|
|
47
|
-
data-star-color-hue-end="75"
|
|
48
|
-
data-star-color-saturation-start="90"
|
|
49
|
-
data-star-color-saturation-end="90"
|
|
50
|
-
data-star-color-lightness-start="40"
|
|
51
|
-
data-star-color-lightness-end="60"
|
|
52
|
-
data-orbit-radius-min="10"
|
|
53
|
-
data-orbit-radius-max="300"
|
|
54
|
-
data-star-lifespan-min="1000"
|
|
55
|
-
data-star-lifespan-max="50000"
|
|
56
|
-
data-width="500"
|
|
57
|
-
data-height="500"
|
|
58
|
-
></bb-star-trail>
|
|
59
|
-
```
|
|
44
|
+
---
|
|
60
45
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- `data-num-stars`: Number of stars to be rendered.
|
|
64
|
-
- `data-star-size-min`: Minimum size of a star.
|
|
65
|
-
- `data-star-size-max`: Maximum size of a star.
|
|
66
|
-
- `data-star-speed-min`: Minimum speed of a star.
|
|
67
|
-
- `data-star-speed-max`: Maximum speed of a star.
|
|
68
|
-
- `data-star-color-hue-start`: Starting hue for star color. Should be a value between 0 and 360.
|
|
69
|
-
- `data-star-color-hue-end`: Ending hue for star color. Should be a value between 0 and 360.
|
|
70
|
-
- `data-star-color-saturation-start`: Specifies the starting color saturation for star color. Should be a value between 0 and 100.
|
|
71
|
-
- `data-star-color-saturation-start`: Specifies the ending color saturation for star color. Should be a value between 0 and 100.
|
|
72
|
-
- `data-star-color-lightness-start`: Specifies the starting color lightness for star color. Should be a value between 0 and 100.
|
|
73
|
-
- `data-star-color-lightness-start`: Specifies the ending color lightness for star color. Should be a value between 0 and 100.
|
|
74
|
-
- `data-radius-min`: Minimum radius for star orbit.
|
|
75
|
-
- `data-radius-max`: Maximum radius for star orbit.
|
|
76
|
-
- `data-star-lifespan-min`: Minimum lifespan of a star in milliseconds.
|
|
77
|
-
- `data-star-lifespan-max`: Maximum lifespan of a star in milliseconds.
|
|
78
|
-
- `data-width`: Width of the star trail component, remove to fit the size of the container
|
|
79
|
-
- `data-height`: height of the star trail component, remove to fit the size of the container
|
|
80
|
-
- `data-background-color`: Background color of the canvas element
|
|
81
|
-
|
|
82
|
-
### Digital Rain
|
|
46
|
+
### [Digital Rain](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/digitalRain.ts)
|
|
83
47
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
48
|
+
A classic matrix-style falling character effect. Highly customizable with character sets, font sizes, speeds, and complex color gradients. Perfect for a retro-hacker or high-tech aesthetic.
|
|
49
|
+
|
|
50
|
+
- 📖 [View in Storybook](https://niekes.github.io/beautiful-backgrounds/?path=/story/backgrounds-digital-rain--default)
|
|
51
|
+
- 🔗 [Source Code](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/digitalRain.ts)
|
|
52
|
+
|
|
53
|
+
### [Hexagon Wave](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/hexagonWave.ts)
|
|
54
|
+
|
|
55
|
+
A sleek, organic waving grid of hexagons (or other polygons). It features dynamic shading, lightness boosts, and wave physics that create a premium, rhythmic motion across the screen.
|
|
56
|
+
|
|
57
|
+
- 📖 [View in Storybook](https://niekes.github.io/beautiful-backgrounds/?path=/story/backgrounds-hexagonwave--default)
|
|
58
|
+
- 🔗 [Source Code](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/hexagonWave.ts)
|
|
59
|
+
|
|
60
|
+
### [Liquid Lines](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/liquidLines.ts)
|
|
61
|
+
|
|
62
|
+
A fluid, undulating animation of multiple lines with gradients and 3D depth effects. It offers extensive control over wave physics, line thickness, and color transitions, making it perfect for organic or "liquid" design themes.
|
|
63
|
+
|
|
64
|
+
- 📖 [View in Storybook](https://niekes.github.io/beautiful-backgrounds/?path=/story/backgrounds-liquidlines--default)
|
|
65
|
+
- 🔗 [Source Code](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/liquidLines.ts)
|
|
66
|
+
|
|
67
|
+
### [Neon Rails](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/neonRails.ts)
|
|
68
|
+
|
|
69
|
+
Fast-moving particles that follow a geometric grid, creating long neon trails. It's ideal for "electric" or "cyberpunk" themes, offering deep control over particle lifespan, grid geometry, and trail opacity.
|
|
70
|
+
|
|
71
|
+
- 📖 [View in Storybook](https://niekes.github.io/beautiful-backgrounds/?path=/story/backgrounds-neon-rails--default)
|
|
72
|
+
- 🔗 [Source Code](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/neonRails.ts)
|
|
97
73
|
|
|
98
|
-
|
|
74
|
+
### [Star Trail](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/startTrail.ts)
|
|
99
75
|
|
|
100
|
-
|
|
101
|
-
- `data-font-size`: Defines the font size of the falling characters.
|
|
102
|
-
- `data-font-color-hue-start`: Specifies the starting color hue for the rain. Should be a value between 0 and 360.
|
|
103
|
-
- `data-font-color-hue-end`: Sets the ending color hue for the rain. Should be a value between 0 and 360.
|
|
104
|
-
- `data-font-color-saturation-start`: Specifies the starting color saturation for the rain. Should be a value between 0 and 100.
|
|
105
|
-
- `data-font-color-saturation-start`: Specifies the ending color saturation for the rain. Should be a value between 0 and 100.
|
|
106
|
-
- `data-font-color-lightness-start`: Specifies the starting color lightness for the rain. Should be a value between 0 and 100.
|
|
107
|
-
- `data-font-color-lightness-start`: Specifies the ending color lightness for the rain. Should be a value between 0 and 100.
|
|
108
|
-
- `data-speed`: Controls the falling speed of the digital rain.
|
|
109
|
-
- `data-background-color`: Background color of the canvas element
|
|
76
|
+
A beautiful celestial animation featuring orbiting stars with fading trails. You can adjust orbit radii, star sizes, and colors to create anything from a subtle night sky to a vibrant cosmic nebula.
|
|
110
77
|
|
|
111
|
-
[
|
|
78
|
+
- 📖 [View in Storybook](https://niekes.github.io/beautiful-backgrounds/?path=/story/backgrounds-star-trail--default)
|
|
79
|
+
- 🔗 [Source Code](https://github.com/niekes/beautiful-backgrounds/blob/main/src/stories/startTrail.ts)
|
|
112
80
|
|
|
113
81
|
<!-- Links -->
|
|
114
82
|
|
|
115
|
-
[build-badge]: https://
|
|
83
|
+
[build-badge]: https://img.shields.io/github/actions/workflow/status/niekes/beautiful-backgrounds/main.yml
|
|
116
84
|
[build]: https://github.com/niekes/beautiful-backgrounds/actions
|
|
85
|
+
[coverage-badge]: https://img.shields.io/codecov/c/github/niekes/beautiful-backgrounds.svg
|
|
86
|
+
[coverage]: https://codecov.io/github/niekes/beautiful-backgrounds
|
|
117
87
|
[esmsh]: https://esm.sh
|
|
88
|
+
[examples]: https://niekes.github.io/beautiful-backgrounds/
|
|
89
|
+
[npm-badge]: https://img.shields.io/npm/v/beautiful-backgrounds
|
|
118
90
|
[npm]: https://www.npmjs.com/package/beautiful-backgrounds
|
|
119
|
-
[examples]: https://codepen.io/collection/aMPozo
|