Torch Card
A card lit by a soft spotlight that follows the pointer, catches its edge and reaches nearby cards.
pixikit.com/docs/components/torch-card
Customize
Spotlight color
Intensity0.15
Spotlight size240px
Softness0.70
Shape
Border glow0.60
Proximity80px
Smoothing0.30
Ambient
Flare
Grain0.00
Theme
Props
15| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | None | Content of the card. |
spotlightColor | string | None | Color of the light. Any CSS color works and its alpha is respected. Defaults to white on dark cards and near black on light ones. |
intensity | number | 0.15 | Brightness of the light on the card surface, from 0 to 1. |
spotlightSize | number | 240 | Radius of the light in px. |
softness | number | 0.7 | How gradually the light fades out. 0 gives a crisp disc, 1 a soft glow that fades from the center. |
shape | "circle" | "beam" | "circle" | Circle is a round spotlight around the pointer. Beam pours light down from the top edge toward it, like a stage light. |
borderGlow | number | 0.6 | How much the card edge catches the light near the pointer, from 0 to 1. |
proximity | number | 80 | Distance in px outside the card at which the light starts to reach it. Cards placed together share one light this way. 0 lights a card only while hovered. |
smoothing | number | 0.3 | How far the light floats behind the pointer. 0 sticks to it. |
ambient | boolean | false | Lets the light drift slowly across the card while nothing points at it, which keeps cards alive on touch screens. |
flare | boolean | true | The light swells and brightens while the card is pressed. |
grain | number | 0 | Film grain inside the light, from 0 to 1. A little removes banding from large soft gradients. |
theme | "dark" | "light" | "dark" | Surface, border and light treatment for dark or light pages. Override the colors with the --spotlight-card-surface and --spotlight-card-border CSS variables. |
className | string | "" | Extra class names for the card. |
style | CSSProperties | None | Inline styles for the card. |