BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/pane/glass-core

glass-core

pane/glass-core
FreeUtility

pane publishes no description for this item.

Install it

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

Source

registry/pane/lib/glass/glass-filter.tsxpane.theui.company/r/glass-core.json
1"use client";
2
3import * as React from "react";
4import { GLASS_DISPLACEMENT } from "./config";
5import { buildDisplacementMap, resolveBand } from "./displacement";
6import type { GlassVariant } from "./types";
7
8interface GlassFilterProps {
9 id: string;
10 variant: GlassVariant;
11 width: number;
12 height: number;
13 radius: number;
14}
15
16/**
17 * Renders the hidden SVG that holds the actual refraction filter. Referenced
18 * from CSS as `backdrop-filter: blur(...) url(#id)`. Chromium applies the
19 * full displacement + chromatic-aberration chain; browsers that don't
20 * support an SVG filter reference inside backdrop-filter simply ignore it
21 * and fall back to the blur/saturate/specular layers, which is why this
22 * only ever adds a bonus layer, never load-bearing.
23 */
24export function GlassFilter({
25 id,
26 variant,
27 width,
28 height,
29 radius,
30}: GlassFilterProps) {
31 const cfg = GLASS_DISPLACEMENT[variant];
32
33 /**
34 * How much of the configured bevel this element can carry. Small controls get
35 * a narrower band (see `resolveBand`) and the deflection has to come down
36 * with it: bending the backdrop further than the band is wide drags samples
37 * from past the far side of the rim.
38 */
39 const scale = resolveBand(width, height, cfg.edge) / cfg.edge;
40 const strength = cfg.strength * scale;
41
42 /** px of slack around the element: enough for the blurred map to settle and
43 * for the rim to sample backdrop from just outside the border box */
44 const margin = Math.ceil(strength + cfg.blur * 3);
45
46 const mapUri = React.useMemo(() => {
47 if (width <= 0 || height <= 0) return null;
48 return buildDisplacementMap({
49 width,
50 height,
51 radius,
52 edge: cfg.edge,
53 margin,
54 });
55 }, [width, height, radius, cfg.edge, margin]);
56
57 if (!mapUri) return null;
58
59 /* the map's full deflection is 127/255 off centre, i.e. half a unit, so a
60 `scale` of 2n buys n px of pull at the rim — config states the px. */
61 const base = strength * 2;
62 const aberration = cfg.chromaticAberration * scale * 2;
63
64 return (
65 <svg
66 aria-hidden="true"
67 focusable="false"
68 className="absolute h-0 w-0 overflow-hidden"
69 >
70 <defs>
71 {/* everything sized in px against the element's own box: with
72 percentage regions the map's placement is left to the filter
73 region and the backdrop ends up offset from the surface it
74 belongs to */}
75 <filter
76 id={id}
77 filterUnits="userSpaceOnUse"
78// … truncated

What it pulls in

npm packages

  • class-variance-authority

Files it writes

  • registry/pane/lib/glass/types.ts
  • registry/pane/lib/glass/config.ts
  • registry/pane/lib/glass/displacement.ts
  • registry/pane/lib/glass/glass-filter.tsx
  • registry/pane/lib/glass/variants.ts

Facts

Registry
pane
Type
registry:lib
Access
Free
Files written
5
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
utilsutilspaneUtilitiesFree2 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

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