This component no longer exists. It was in Svelte Animations’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-05 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Terminal
svelte-animations/terminalRemovedBlock
A terminal-like UI component with typing animations, sequence control, and intersection observer support.
Install it
npx shadcn@latest add https://sv-animations.vercel.app/r/terminal.jsonSource
1<script lang="ts">2 import { onMount, setContext } from "svelte";3 import { cn } from "$UTILS$";4 import type { Snippet } from "svelte";5 import { watch } from "runed";67 interface TerminalProps {8 children: Snippet;9 class?: string;10 sequence?: boolean;11 startOnView?: boolean;12 }1314 let {15 children,16 class: className,17 sequence = true,18 startOnView = true,19 }: TerminalProps = $props();2021 let containerRef: HTMLDivElement | null = $state(null);22 let isInView = $state(false);23 let activeIndex = $state(0);2425 const sequenceHasStarted = $derived(sequence ? !startOnView || isInView : false);2627 // Set context for child components - always set it, check sequence inside28 let useSequence = $derived(sequence);29 watch(30 () => useSequence,31 () => {32 // setContext("terminal-sequence", val);33 setContext(34 "terminal-sequence",35 useSequence36 ? {37 get activeIndex() {38 return activeIndex;39 },40 get sequenceStarted() {41 return sequenceHasStarted;42 },43 completeItem: (index: number) => {44 if (index === activeIndex) {45 activeIndex = activeIndex + 1;46 }47 },48 }49 : null50 );51 }52 );5354 onMount(() => {55 if (!startOnView || !sequence) {56 isInView = true;57 return;58 }5960 if (!containerRef) return;6162 const observer = new IntersectionObserver(63 ([entry]) => {64 if (entry.isIntersecting) {65 isInView = true;66 observer.disconnect();67 }68 },69 {70 threshold: 0.3,71 }72 );7374 observer.observe(containerRef);7576 return () => observer.disconnect();77 });78</script>7980<div81 bind:this={containerRef}82 class={cn(83 "border-border bg-background z-0 h-full max-h-[400px] w-full max-w-lg rounded-xl border",84 className85 )}86>87 <div class="border-border flex flex-col gap-y-2 border-b p-4">88 <div class="flex flex-row gap-x-2">89 <div class="h-2 w-2 rounded-full bg-red-500"></div>90 <div class="h-2 w-2 rounded-full bg-yellow-500"></div>91 <div class="h-2 w-2 rounded-full bg-green-500"></div>92 </div>93 </div>94 <pre class="p-4">95 <code class="grid gap-y-1 overflow-auto">{@render children()}</code>96 </pre>97</div>
What it pulls in
npm packages
