BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/pane/use-glass-support

use-glass-support

pane/use-glass-support
FreeHook

pane publishes no description for this item.

Install it

npx shadcn@latest add https://pane.theui.company/r/use-glass-support.json

Source

registry/pane/hooks/use-glass-support.tspane.theui.company/r/use-glass-support.json
1"use client";
2
3import * as React from "react";
4import type { GlassQuality } from "../lib/glass/types";
5
6function detectQuality(): GlassQuality {
7 if (
8 typeof window === "undefined" ||
9 typeof window.CSS?.supports !== "function"
10 ) {
11 return "none";
12 }
13
14 const reducedTransparency = window.matchMedia?.(
15 "(prefers-reduced-transparency: reduce)",
16 ).matches;
17 if (reducedTransparency) return "none";
18
19 const supportsBackdropFilter =
20 CSS.supports("backdrop-filter", "blur(1px)") ||
21 CSS.supports("-webkit-backdrop-filter", "blur(1px)");
22 if (!supportsBackdropFilter) return "none";
23
24 // Only Chromium currently honors an SVG filter reference layered inside
25 // backdrop-filter, so that's the signal we use to unlock the full
26 // refraction pass. Everyone else still gets blur + saturate + specular.
27 const isChromium =
28 /Chrome|Chromium|Edg\//.test(navigator.userAgent) &&
29 !/OPR\//.test(navigator.userAgent);
30
31 return isChromium ? "full" : "reduced";
32}
33
34/**
35 * Feature-detects how much of the glass effect the current browser/user
36 * preference can render, so components can degrade gracefully instead of
37 * shipping a broken filter.
38 */
39export function useGlassSupport(): GlassQuality {
40 const [quality, setQuality] = React.useState<GlassQuality>("reduced");
41
42 React.useEffect(() => {
43 setQuality(detectQuality());
44
45 const media = window.matchMedia?.("(prefers-reduced-transparency: reduce)");
46 const handleChange = () => setQuality(detectQuality());
47 media?.addEventListener("change", handleChange);
48 return () => media?.removeEventListener("change", handleChange);
49 }, []);
50
51 return quality;
52}

What it pulls in

Other registry items

  • @pane/glass-core

Files it writes

  • registry/pane/hooks/use-glass-support.ts

Facts

Registry
pane
Type
registry:hook
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-20
Last confirmed
today

Go to the source

pane.theui.company deniiiiz-i/pane on GitHub Raw registry item This item as JSON

More from pane

All 25 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
use-glass-pointeruse-glass-pointerpaneHooksFree1 dep

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

KitGrade

SaaS starter kits, scored on what can be checked

kitgrade.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 KitGrade

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 KitGrade

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 KitGrade

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