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
"use client";import { useEffect, useRef } from "react";import { BackToTop } from "@/components/ui/back-to-top";import { Separator } from "@/components/ui/separator";const sections = [ { title: "Overview", body: "A short summary of what this project does and who it is for." }, { title: "Installation", body: "Install the package with your preferred package manager." }, { title: "Configuration", body: "Set your options in one config file at the root of the project." }, { title: "Usage", body: "Import the main component and render it wherever you need it." }, { title: "Theming", body: "Override the design tokens to match the colors of your brand." }, { title: "Accessibility", body: "Keyboard navigation and screen reader labels are built in." }, { title: "Troubleshooting", body: "Common issues and how to resolve them quickly." },];export default function BackToTopDemo() { const scrollRef = useRef<HTMLDivElement>(null); useEffect(() => { if (scrollRef.current) scrollRef.current.scrollTop = 200; }, []); return ( <div className="relative h-[360px] w-full max-w-md"> <div ref={scrollRef} className="h-full overflow-y-auto rounded-md border p-4" > <div className="flex flex-col gap-4"> {sections.map((section, i) => ( <div key={section.title} className="flex flex-col gap-4"> <div className="flex flex-col gap-1"> <p className="text-sm font-medium">{section.title}</p> <p className="text-sm text-muted-foreground">{section.body}</p> </div> {i < sections.length - 1 && <Separator />} </div> ))} </div> </div> <BackToTop scrollRoot={scrollRef} threshold={120} position="absolute" showLabel /> </div> );}