A burning hole that reveals the next image
| Name | Type | Default | Description |
|---|---|---|---|
images | (string | { src: string; alt?: string })[] | 3 botanical photos | Photos to burn through, in order. Each burn reveals the next one and the list loops. |
aspectRatio | number | 4 / 3 | Width divided by height. 0 fills the parent's height instead. Photos are cropped to cover. |
radius | number | 16 | Corner radius in pixels. |
emberColor | string | "#FF7A1F" | Colour of the burning edge. Its hot core, deep glow and sparks are derived from it. |
charColor | string | "#1C120C" | Colour of the charred band behind the flame and of the smoke. |
glow | number | 1 | Brightness of the burning edge, from 0 (a cold char line) to 3. |
edge | number | 1 | Width of the flame, char and scorch bands. |
roughness | number | 0.5 | How ragged the burn is, from 0 (smooth curves) to 1 (deep fingers and stray holes). |
detail | number | 5 | Scale of the raggedness. Higher values make smaller, busier lobes. |
scorch | number | 0.7 | How much the photo browns ahead of the flame, from 0 to 1. |
smoke | number | 0.4 | Smoke rising from the burning edge, from 0 to 1. |
sparks | number | 0.5 | Sparks thrown off the edge while it burns, from 0 to 1. |
shimmer | number | 0.6 | Heat haze that ripples the photo just above the flame, from 0 to 1. |
burnDuration | number | 1.8 | Seconds a click takes to burn through the whole photo. |
pocketSize | number | 90 | Radius in pixels of the hole the pointer burns while hovering. 0 turns it off. |
heal | number | 0.3 | Seconds the hover hole takes to close behind the pointer. Longer values leave a trail. |
follow | number | 0.12 | Seconds the hover hole takes to catch up with the pointer. |
hover | boolean | true | Burn a hole that follows the pointer to peek at the next photo. |
clickToBurn | boolean | true | Clicking, or pressing Enter, burns through to the next photo from that point. |
autoplay | boolean | false | While nobody is interacting, a burning hole wanders on its own and burns through to the next photo every few seconds. |
interval | number | 3.5 | Seconds between autoplay burns. |
idleDelay | number | 2.5 | Seconds after the pointer leaves before autoplay resumes. |
onChange | (index: number) => void | — | Called with the index of the photo that is now on top, after each burn. |
ref | { ignite, next, reset } | — | ignite(x, y) starts a burn from a point given as fractions of the width and height. next() burns from the centre. reset() jumps back to the first photo. |
className | string | — | Classes for the root element, which fills its parent's width. |
style | CSSProperties | — | Inline styles for the root element. |
images(string | { src: string; alt?: string })[]Photos to burn through, in order. Each burn reveals the next one and the list loops.
3 botanical photosaspectRationumberWidth divided by height. 0 fills the parent's height instead. Photos are cropped to cover.
4 / 3radiusnumberCorner radius in pixels.
16emberColorstringColour of the burning edge. Its hot core, deep glow and sparks are derived from it.
"#FF7A1F"charColorstringColour of the charred band behind the flame and of the smoke.
"#1C120C"glownumberBrightness of the burning edge, from 0 (a cold char line) to 3.
1edgenumberWidth of the flame, char and scorch bands.
1roughnessnumberHow ragged the burn is, from 0 (smooth curves) to 1 (deep fingers and stray holes).
0.5detailnumberScale of the raggedness. Higher values make smaller, busier lobes.
5scorchnumberHow much the photo browns ahead of the flame, from 0 to 1.
0.7smokenumberSmoke rising from the burning edge, from 0 to 1.
0.4sparksnumberSparks thrown off the edge while it burns, from 0 to 1.
0.5shimmernumberHeat haze that ripples the photo just above the flame, from 0 to 1.
0.6burnDurationnumberSeconds a click takes to burn through the whole photo.
1.8pocketSizenumberRadius in pixels of the hole the pointer burns while hovering. 0 turns it off.
90healnumberSeconds the hover hole takes to close behind the pointer. Longer values leave a trail.
0.3follownumberSeconds the hover hole takes to catch up with the pointer.
0.12hoverbooleanBurn a hole that follows the pointer to peek at the next photo.
trueclickToBurnbooleanClicking, or pressing Enter, burns through to the next photo from that point.
trueautoplaybooleanWhile nobody is interacting, a burning hole wanders on its own and burns through to the next photo every few seconds.
falseintervalnumberSeconds between autoplay burns.
3.5idleDelaynumberSeconds after the pointer leaves before autoplay resumes.
2.5onChange(index: number) => voidCalled with the index of the photo that is now on top, after each burn.
—ref{ ignite, next, reset }ignite(x, y) starts a burn from a point given as fractions of the width and height. next() burns from the centre. reset() jumps back to the first photo.
—classNamestringClasses for the root element, which fills its parent's width.
—styleCSSPropertiesInline styles for the root element.
—