Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { useEffect, useRef } from 'react'import { createGlass } from '@/components/canvasui/GlassVanilla'import { Badge } from '@/components/ui/badge'import { Button } from '@/components/ui/button'export default function GlassDemo() { const sourceRef = useRef<HTMLCanvasElement>(null) const contentRef = useRef<HTMLDivElement>(null) const outputRef = useRef<HTMLCanvasElement>(null) useEffect(() => { const source = sourceRef.current const content = contentRef.current const output = outputRef.current if (!source || !content || !output) return const glass = createGlass({ source, content, output }, { shape: 'circle', size: 110, zoom: 1.4 }) return () => glass?.destroy() }, []) return ( <section className='relative h-[400px] w-full max-w-2xl overflow-hidden rounded-xl border'> <canvas ref={sourceRef} className='absolute inset-0 h-full w-full'> <div ref={contentRef} className='flex h-full w-full flex-col justify-center gap-4 bg-background p-10'> <Badge variant='secondary' className='w-fit'>New</Badge> <p className='text-2xl font-semibold tracking-tight'>Look through the glass</p> <p className='max-w-sm text-sm text-muted-foreground'> Move your cursor across the page to see the content refract beneath the lens. </p> <div className='flex gap-2'> <Button data-glass-target>Get started</Button> <Button variant='outline' data-glass-target>Learn more</Button> </div> </div> </canvas> <canvas ref={outputRef} className='pointer-events-none absolute inset-0 h-full w-full' /> </section> )}