TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/nightshade/llms.txt
Use this file to discover all available pages before exploring further.
Candle component renders a self-contained animated candle — a white wax pillar with a flickering amber flame on top. It is used throughout the Nightshade interface wherever ambient candlelight atmosphere is needed, from the home page selection menu to timeline markers and blog listing hover states.
Where Candle is used
Home Page
Rendered in the candle selection menu, where the user chooses a candle to enter the Sanctum.
About Timeline
Appears as glowing markers alongside timeline entries on the About page.
Blog Listing
Shown as hover indicators next to post titles in the blog index.
Testimonials
Used as decorative accent elements inside testimonial cards.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
height | number | 60 | Height of the wax candle body in pixels |
width | number | 20 | Width of the candle body in pixels |
delayIndex | number | 1 | Index (1–4) selecting a CSS animation delay class |
isLit | boolean | true | Whether to render the flame on top of the candle |
className | string | "" | Additional CSS classes applied to the outer wrapper |
Flame animation
WhenisLit is true, a motion.div styled as a rounded teardrop shape appears above the wick. The shape uses a radial gradient to simulate the warm glow of a real flame:
.animate-flicker CSS class, which plays a looping keyframe animation defined in main.css:
main.css
Animation delay classes
When multiple candles are rendered together, applying the same animation timing makes them all flicker in perfect sync — which looks mechanical. ThedelayIndex prop selects one of four CSS delay classes to stagger each candle’s animation start:
| Class | Delay |
|---|---|
.flicker-delay-1 | 0s |
.flicker-delay-2 | 0.3s |
.flicker-delay-3 | 0.6s |
.flicker-delay-4 | 0.9s |
delayIndex to a class using `flicker-delay-${delayIndex % 4 + 1}`, so values outside 1–4 wrap around gracefully.
The four delay classes must be defined in
main.css for the staggered flicker to work. Adding a fifth candle with delayIndex={5} will wrap back to .flicker-delay-2.Candle body
The wax body is a plaindiv with bg-witch-moonlight (an off-white) and rounded top and bottom corners to approximate a cylindrical shape. Two lighter highlight strips are absolutely positioned near the left edge to simulate a light source catching the rounded surface. A gradient overlay fades from witch-amber/20 at the top to transparent at the bottom, giving the impression that the flame above is casting warm light down the wax.