- Docs
- Components
- Backgrounds
- Black Hole
Smoky light bending around a black hole and its photon ring
| Name | Type | Default | Description |
|---|---|---|---|
width | string | number | "100%" | Width of the component. |
height | string | number | "100%" | Height of the component. |
speed | number | 1 | Speed of the orbiting light. |
zoom | number | 1.8 | Field of view. Higher values show more of the field and a smaller hole. |
particleCount | number | 13 | Number of orbiting particles, from 1 to 30. |
orbSize | number | 0.75 | Radius of the particle orbits. |
glow | number | 0.08 | Brightness of each particle. |
contrast | number | 3 | Curve applied to the light. Higher values give tighter, brighter bands. |
mirrorSplits | number | 2 | Number of mirrored segments in the warp. |
warpEnabled | boolean | true | Bends the light into the mirrored lensing warp. |
distanceFade | number | 0.35 | How quickly the light gathers away from the centre. |
colorShiftR | number | -6 | Phase of the red channel in the colour cycle. |
colorShiftG | number | -6 | Phase of the green channel in the colour cycle. |
colorShiftB | number | -6 | Phase of the blue channel in the colour cycle. |
colorSpeed | number | 0.2 | Speed of the colour cycle. |
colors | [string, string] | undefined | Tints the light from the brightest core to the faint edges. Replaces the colour cycle when set. |
backgroundColor | string | "#000000" | Background colour. Use transparent to show the page behind. Light backgrounds switch to an ink rendering. |
opacity | number | 1 | Overall opacity, from 0 to 1. |
bloom | number | 1 | Soft glow around the brightest light, from 0 to 4. |
ringIntensity | number | 1 | Brightness of the thin photon ring at the sphere's edge. It glows brightest where the light passes behind. |
cursorInteraction | boolean | true | Hovering quickens the orbits. A click makes the hole gulp: the orbits contract and spring back. |
cursorIntensity | number | 1 | Strength of the hover and the gulp, from 0 to 3. |
intro | boolean | true | Fades the light in and spins the orbits into place. |
paused | boolean | false | Stops the motion. Reduced-motion users get a still frame. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
children | ReactNode | undefined | Content rendered above the effect. |
ref | { gulp, replay } | undefined | gulp(strength?) triggers a gulp from code. replay() plays the intro again. |
className | string | undefined | Classes for the root element. |
style | CSSProperties | undefined | Inline styles for the root element. |
widthstring | numberWidth of the component.
"100%"heightstring | numberHeight of the component.
"100%"speednumberSpeed of the orbiting light.
1zoomnumberField of view. Higher values show more of the field and a smaller hole.
1.8particleCountnumberNumber of orbiting particles, from 1 to 30.
13orbSizenumberRadius of the particle orbits.
0.75glownumberBrightness of each particle.
0.08contrastnumberCurve applied to the light. Higher values give tighter, brighter bands.
3mirrorSplitsnumberNumber of mirrored segments in the warp.
2warpEnabledbooleanBends the light into the mirrored lensing warp.
truedistanceFadenumberHow quickly the light gathers away from the centre.
0.35colorShiftRnumberPhase of the red channel in the colour cycle.
-6colorShiftGnumberPhase of the green channel in the colour cycle.
-6colorShiftBnumberPhase of the blue channel in the colour cycle.
-6colorSpeednumberSpeed of the colour cycle.
0.2colors[string, string]Tints the light from the brightest core to the faint edges. Replaces the colour cycle when set.
undefinedbackgroundColorstringBackground colour. Use transparent to show the page behind. Light backgrounds switch to an ink rendering.
"#000000"opacitynumberOverall opacity, from 0 to 1.
1bloomnumberSoft glow around the brightest light, from 0 to 4.
1ringIntensitynumberBrightness of the thin photon ring at the sphere's edge. It glows brightest where the light passes behind.
1cursorInteractionbooleanHovering quickens the orbits. A click makes the hole gulp: the orbits contract and spring back.
truecursorIntensitynumberStrength of the hover and the gulp, from 0 to 3.
1introbooleanFades the light in and spins the orbits into place.
truepausedbooleanStops the motion. Reduced-motion users get a still frame.
falsedprnumberMaximum device pixel ratio for the canvas.
2childrenReactNodeContent rendered above the effect.
undefinedref{ gulp, replay }gulp(strength?) triggers a gulp from code. replay() plays the intro again.
undefinedclassNamestringClasses for the root element.
undefinedstyleCSSPropertiesInline styles for the root element.
undefined