edge-blur
cult-ui/edge-blurUnverifiedComponent
Stacked backdrop-blur layers with a gradient mask for soft top or bottom screen edges
Install it
npx shadcn@latest add https://raw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/edge-blur.jsonSource
1"use client"23interface EdgeBlurProps {4 position?: "top" | "bottom"5 height?: number6}78export function EdgeBlur({ position = "bottom", height = 75 }: EdgeBlurProps) {9 const blurLayers = [1, 2, 3, 6, 12]1011 const isTop = position === "top"1213 return (14 <div15 className={`fixed inset-x-0 isolate z-40 pointer-events-none ${isTop ? "top-0" : "bottom-0"}`}16 style={{ height }}17 >18 {blurLayers.map((blur) => (19 <div20 key={blur}21 className="absolute inset-0"22 style={{23 backdropFilter: `blur(${blur}px)`,24 WebkitBackdropFilter: `blur(${blur}px)`,25 maskImage: `linear-gradient(to ${isTop ? "bottom" : "top"}, black, transparent)`,26 WebkitMaskImage: `linear-gradient(to ${isTop ? "bottom" : "top"}, black, transparent)`,27 }}28 />29 ))}30 </div>31 )32}3334// Convenience exports for specific positions35export function TopBlur({ height = 75 }: { height?: number }) {36 return <EdgeBlur position="top" height={height} />37}3839export function BottomBlur({ height = 75 }: { height?: number }) {40 return <EdgeBlur position="bottom" height={height} />41}
Files it writes
More from cult/ui
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ai-instructionsai-instructions | cult/ui | Components | Unverified | 2 deps | |
| ai-instructions-demoai-instructions-demo | cult/ui | Components | Unverified | no deps | |
| animated-numberanimated-number | cult/ui | Components | Unverified | 1 dep | |
| animated-number-demoanimated-number-demo | cult/ui | Components | Unverified | no deps | |
| bg-animate-buttonbg-animate-button | cult/ui | Components | Unverified | no deps | |
| bg-animate-button-demobg-animate-button-demo | cult/ui | Components | Unverified | no deps | |
| bg-animated-fractal-dot-gridbg-animated-fractal-dot-grid | cult/ui | Components | Unverified | 1 dep | |
| bg-animated-fractal-dot-grid-demobg-animated-fractal-dot-grid-demo | cult/ui | Components | Unverified | no deps |
