Color Panels
Installation
npm i @paper-design/shaders-react
Code
import { ColorPanels } from '@paper-design/shaders-react'; <ColorPanels height={500} colors={["#cc3333", "#cc9933", "#99cc33", "#33cc33", "#33cc99", "#3399cc", "#3333cc"]} colorBack="#000000" density={3} angle1={0} angle2={0} length={1.1} edges={false} blur={0} fadeIn={1} fadeOut={0.3} gradient={0} offsetX={0} offsetY={0} scale={0.8} rotation={0} speed={0.5} />
Props
Name | Description | Type | Values |
---|---|---|---|
colors | Up to 7 colors used to color the panels | string[] | Hex, RGB, or HSL color |
colorBack | Background color | string | Hex, RGB, or HSL color |
density | Angle between every 2 panels | number | 0.25 to 7 |
angle1 | Skew angle applied to all panes | number | -1 to 1 |
angle2 | Skew angle applied to all panes | number | -1 to 1 |
length | Panel length (relative to total height) | number | 0 to 3 |
edges | Color highlight on the panels edges | boolean | | true | false |
blur | Side blur (0 for sharp edges) | number | 0 to 0.5 |
fadeIn | Transparency near central axis | number | 0 to 1 |
fadeOut | Transparency near viewer | number | 0 to 1 |
gradient | Color mixing within a panel (0 = solid panel color, 1 = gradient of two colors) | number | 0 to 1 |
offsetX | Horizontal offset of the graphics center | number | -1 to 1 |
offsetY | Vertical offset of the graphics center | number | -1 to 1 |
width | CSS width style of the shader element | number | string | — |
height | CSS height style of the shader element | number | string | — |
scale | Overall zoom level of the graphics | number | 0.01 to 4 |
rotation | Overall rotation angle of the graphics | number | 0 to 360 |
speed | Animation speed | number | 0 to 2 |
Description
Glowing translucent 3D panels rotating around a central axis.