orb-demo
elevenlabs/orb-demoFreeExample
shadcn/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/elevenlabs/ui/main/apps/www/public/r/orb-demo.jsonSource
1"use client"23import { useState } from "react"45import { Button } from "@/components/ui/button"6import { AgentState, Orb } from "@/components/ui/orb"78let ORBS: [string, string][] = [9 ["#CADCFC", "#A0B9D1"],10 ["#F6E7D8", "#E0CFC2"],11 ["#E5E7EB", "#9CA3AF"],12]1314export default function OrbDemo({ small = false }: { small?: boolean }) {15 const [agent, setAgent] = useState<AgentState>(null)1617 ORBS = small ? [ORBS[0]] : ORBS1819 return (20 <div className="bg-card w-full rounded-lg border p-6">21 <div className="mb-4">22 <h3 className="text-lg font-semibold">Agent Orbs</h3>23 <p className="text-muted-foreground text-sm">24 Interactive orb visualization with agent states25 </p>26 </div>2728 <div className="space-y-4">29 <div className="flex justify-center gap-8">30 {ORBS.map((colors, index) => (31 <div32 key={index}33 className={`relative ${index === 1 ? "block md:block" : "hidden md:block"}`}34 >35 <div className="bg-muted relative h-32 w-32 rounded-full p-1 shadow-[inset_0_2px_8px_rgba(0,0,0,0.1)] dark:shadow-[inset_0_2px_8px_rgba(0,0,0,0.5)]">36 <div className="bg-background h-full w-full overflow-hidden rounded-full shadow-[inset_0_0_12px_rgba(0,0,0,0.05)] dark:shadow-[inset_0_0_12px_rgba(0,0,0,0.3)]">37 <Orb38 colors={colors}39 seed={(index + 1) * 1000}40 agentState={agent}41 />42 </div>43 </div>44 </div>45 ))}46 </div>4748 <div className="flex flex-wrap justify-center gap-2">49 <Button50 size="sm"51 variant="outline"52 onClick={() => setAgent(null)}53 disabled={agent === null}54 >55 Idle56 </Button>57 <Button58 size="sm"59 variant="outline"60 onClick={() => setAgent("listening")}61 disabled={agent === "listening"}62 >63 Listening64 </Button>65 <Button66 size="sm"67 variant="outline"68 disabled={agent === "talking"}69 onClick={() => setAgent("talking")}70 >71 Talking72 </Button>73 </div>74 </div>75 </div>76 )77}
What it pulls in
Other registry items
Files it writes
More from shadcn/ui
All 50 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| audio-player-demoaudio-player-demo | shadcn/ui | Examples | Free | no deps | |
| bar-visualizer-demobar-visualizer-demo | shadcn/ui | Examples | Free | no deps | |
| conversation-bar-democonversation-bar-demo | shadcn/ui | Examples | Free | no deps | |
| conversation-democonversation-demo | shadcn/ui | Examples | Free | no deps | |
| live-waveform-demolive-waveform-demo | shadcn/ui | Examples | Free | no deps | |
| matrix-demomatrix-demo | shadcn/ui | Examples | Free | no deps | |
| message-demomessage-demo | shadcn/ui | Examples | Free | no deps | |
| mic-selector-demomic-selector-demo | shadcn/ui | Examples | Free | no deps |
