Docs/Formas

Obsidian

MIT

Dark tinted glass whose faces stay near-black while every surface turning away from the viewer ignites with a flowing iridescent gradient — vivid color living only on the oblique walls and bevels

Cargando shader…

Ajústalo

1
0
1
0.55
0.25
30

Instalación

Terminal
npx shadcn@latest add https://<tu-dominio>/r/shader-obsidian.json

Crea components/bastard/ShaderObsidian.tsx e instala shaders. Más opciones

Uso

Demo.tsx
1import ShaderObsidian from '@/components/bastard/ShaderObsidian';
2
3export default function Demo() {
4 return (
5 <ShaderObsidian
6 scale={1}
7 rotation={0}
8 bodyColor="#06071a"
9 colorA="#ff2f7a"
10 colorB="#5fe6ff"
11 colorSpace="oklab"
12 iridescence={1}
13 rimWidth={0.55}
14 rimSoftness={0.25}
15 flowAngle={30}
16 />
17 );
18}

Props

PropTipoPor defectoDescripción
scalenumber1Scale
rotationnumber0Rotation
bodyColorstring"#06071a"Body Color
colorAstring"#ff2f7a"Color A
colorBstring"#5fe6ff"Color B
colorSpace'linear' | 'oklch' | 'oklab' | 'hsl' | 'hsv' | 'lch'"oklab"Color Space
iridescencenumber1Iridescence
rimWidthnumber0.55Rim Width
rimSoftnessnumber0.25Rim Softness
flowAnglenumber30Flow Angle

Aquí aparecen las props ajustables. El componente acepta más: revisa el código fuente.

Créditos

Basado en Obsidian · Shaders.com, adaptado para BSTRD UI.Licencia: MIT. Puedes usarlo, modificarlo y venderlo, conservando el aviso de copyright que va dentro del archivo.