1 GitHub star = 1 new component.
Spotlight circle that darkens the rest of the page for feature tours.
Copy and paste this code into your React component:
import { SpotlightIndicator } from 'react-component-kit-ui/overlays'; <SpotlightIndicator>Content</SpotlightIndicator>
If you are not using the npm package, create a new file and paste the following code: src/components/SpotlightIndicator.tsx + SpotlightIndicator.css:
src/components/SpotlightIndicator.tsx
SpotlightIndicator.css
'use client'; import './SpotlightIndicator.css'; /** SpotlightIndicator โ ported from astro-component-kit. */ export interface SpotlightIndicatorProps { } export function SpotlightIndicator({}: SpotlightIndicatorProps) { return ( <> <div className="spot-mask" data-rk-48346e=""></div> </> ); } export default SpotlightIndicator;
/* SpotlightIndicator โ ported from astro-component-kit (overlays/SpotlightIndicator.astro) */ .spot-mask:where([data-rk-48346e]) { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500; clip-path: circle(60px at 50% 50%); pointer-events: none; }
SpotlightIndicator.tsx