BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/einui/glass-spotlight

Glass Spotlight

einui/glass-spotlight
FreeComponent

A spotlight component that highlights specific areas of the UI with a glass morphism effect.

Install it

npx shadcn@latest add https://ui.eindev.ir/r/glass-spotlight.json

Source

registry/innovative/glass-spotlight.tsxui.eindev.ir/r/glass-spotlight.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { X, ChevronLeft, ChevronRight } from "lucide-react"
5import { cn } from "@/lib/utils"
6
7interface SpotlightStep {
8 target: string // CSS selector
9 title: string
10 description: string
11 placement?: "top" | "bottom" | "left" | "right"
12}
13
14interface GlassSpotlightProps {
15 steps: SpotlightStep[]
16 open?: boolean
17 onOpenChange?: (open: boolean) => void
18 onComplete?: () => void
19}
20
21function GlassSpotlight({ steps, open = false, onOpenChange, onComplete }: GlassSpotlightProps) {
22 const [currentStep, setCurrentStep] = React.useState(0)
23 const [targetRect, setTargetRect] = React.useState<DOMRect | null>(null)
24
25 const step = steps[currentStep]
26
27 React.useLayoutEffect(() => {
28 if (!open || !step) return
29
30 const target = document.querySelector(step.target)
31 if (target) {
32 const rect = target.getBoundingClientRect()
33 // eslint-disable-next-line react-hooks/set-state-in-effect
34 setTargetRect(rect)
35 target.scrollIntoView({ behavior: "smooth", block: "center" })
36 }
37 }, [open, step, currentStep])
38
39 React.useEffect(() => {
40 const handleResize = () => {
41 if (!step) return
42 const target = document.querySelector(step.target)
43 if (target) {
44 setTargetRect(target.getBoundingClientRect())
45 }
46 }
47
48 window.addEventListener("resize", handleResize)
49 return () => window.removeEventListener("resize", handleResize)
50 }, [step])
51
52 const handleNext = () => {
53 if (currentStep < steps.length - 1) {
54 setCurrentStep((prev) => prev + 1)
55 } else {
56 onComplete?.()
57 onOpenChange?.(false)
58 setCurrentStep(0)
59 }
60 }
61
62 const handlePrev = () => {
63 if (currentStep > 0) {
64 setCurrentStep((prev) => prev - 1)
65 }
66 }
67
68 const handleClose = () => {
69 onOpenChange?.(false)
70 setCurrentStep(0)
71 }
72
73 if (!open || !targetRect) return null
74
75 const padding = 8
76 const tooltipWidth = 320
77
78 // Calculate tooltip position
79 let tooltipStyle: React.CSSProperties = {}
80 const placement = step.placement || "bottom"
81
82 switch (placement) {
83 case "top":
84 tooltipStyle = {
85 left: targetRect.left + targetRect.width / 2 - tooltipWidth / 2,
86 bottom: window.innerHeight - targetRect.top + padding + 12,
87 }
88 break
89 case "bottom":
90 tooltipStyle = {
91 left: targetRect.left + targetRect.width / 2 - tooltipWidth / 2,
92 top: targetRect.bottom + padding + 12,
93 }
94 break
95 case "left":
96// … truncated

Files it writes

  • registry/innovative/glass-spotlight.tsx

Facts

Registry
einui
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-11
Last confirmed
today

Go to the source

Docs on einui ui.eindev.ir einui/einui on GitHub Raw registry item This item as JSON

More from einui

All 44 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Base Widgetbase-widgeteinuiComponentsFree1 dep
Calendar Widgetscalendar-widgeteinuiComponentsFree1 dep
Clock Widgetsclock-widgeteinuiComponentsFree1 dep
Glass Alert Dialogglass-alert-dialogeinuiComponentsFree1 dep
Glass Avatarglass-avatareinuiComponentsFree1 dep
Glass Badgeglass-badgeeinuiComponentsFree1 dep
Glass Breadcrumbglass-breadcrumbeinuiComponentsFree1 dep
Glass Buttonglass-buttoneinuiComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex