A curved timeline that rotates through milestone steps with clickable markers, icons, and configurable spacing.
Founded Visionary Tech, a cutting-edge AI development company.
Launched first AI-powered mobile app for personalized recommendations.
Raised $3M seed round at a $20M valuation.
Expanded to global markets with localized app versions in 5 countries.
Implemented enhanced machine learning algorithms for data prediction.
Introduced AI-powered virtual assistant for customer service.
Partnered with several tech giants to enhance app capabilities.
Launched AR-based features for more immersive user experiences.
Rolled out AI-driven marketplace for personalized product discovery.
Introduced blockchain integration for secure transactions.
Showcased at CES with revolutionary AI-powered consumer products.
Rebranded company with new logo and visual identity.
Launched AI-driven content creation tool for marketing teams.
Acquired a competitor in the AI space to strengthen market position.
Launched self-driving AI platform for industrial automation.
Added virtual reality integration to the product suite.
Introduced AI-driven analytics dashboard for enterprise clients.
Launched international expansion into Asian and European markets.
Hosted first global conference showcasing AI innovations.
Released API for developers to integrate AI into their applications.
Launched new AI-powered voice assistant with multi-language support.
Partnered with government agencies for AI-driven policy making.
Unveiled new AI-powered robotics platform for manufacturing.
Introduced machine learning models for sustainable energy solutions.
<script lang="ts"> import BoxIcon from "@lucide/svelte/icons/box"; import GlobeIcon from "@lucide/svelte/icons/globe"; import LockIcon from "@lucide/svelte/icons/lock"; import RocketIcon from "@lucide/svelte/icons/rocket"; import SettingsIcon from "@lucide/svelte/icons/settings"; import SparklesIcon from "@lucide/svelte/icons/sparkles"; import StarIcon from "@lucide/svelte/icons/star"; import ZapIcon from "@lucide/svelte/icons/zap"; import { ArcTimeline, type ArcTimelineItem } from "$lib/components/magic/arc-timeline/index.js";
const TIMELINE: ArcTimelineItem[] = [ { time: "2022", steps: [ { icon: rocketIcon, content: "Founded Visionary Tech, a cutting-edge AI development company.", }, { icon: boxIcon, content: "Launched first AI-powered mobile app for personalized recommendations.", }, ], }, { time: "2023", steps: [ { icon: lockIcon, content: "Raised $3M seed round at a $20M valuation.", }, { icon: globeIcon, content: "Expanded to global markets with localized app versions in 5 countries.", }, { icon: settingsIcon, content: "Implemented enhanced machine learning algorithms for data prediction.", }, ], }, { time: "2024", steps: [ { icon: rocketIcon, content: "Introduced AI-powered virtual assistant for customer service.", }, { icon: globeIcon, content: "Partnered with several tech giants to enhance app capabilities.", }, { icon: sparklesIcon, content: "Launched AR-based features for more immersive user experiences.", }, ], }, { time: "2025 Q1", steps: [ { icon: starIcon, content: "Rolled out AI-driven marketplace for personalized product discovery.", }, { icon: zapIcon, content: "Introduced blockchain integration for secure transactions.", }, { icon: rocketIcon, content: "Showcased at CES with revolutionary AI-powered consumer products.", }, ], }, { time: "2025 Q2", steps: [ { icon: settingsIcon, content: "Rebranded company with new logo and visual identity.", }, { icon: starIcon, content: "Launched AI-driven content creation tool for marketing teams.", }, { icon: boxIcon, content: "Acquired a competitor in the AI space to strengthen market position.", }, ], }, { time: "2025 Q3", steps: [ { icon: boxIcon, content: "Launched self-driving AI platform for industrial automation.", }, { icon: sparklesIcon, content: "Added virtual reality integration to the product suite.", }, ], }, { time: "2025 Q4", steps: [ { icon: starIcon, content: "Introduced AI-driven analytics dashboard for enterprise clients.", }, { icon: zapIcon, content: "Launched international expansion into Asian and European markets.", }, { icon: rocketIcon, content: "Hosted first global conference showcasing AI innovations.", }, ], }, { time: "2026 Q1", steps: [ { icon: settingsIcon, content: "Released API for developers to integrate AI into their applications.", }, { icon: starIcon, content: "Launched new AI-powered voice assistant with multi-language support.", }, { icon: globeIcon, content: "Partnered with government agencies for AI-driven policy making.", }, ], }, { time: "2026 Q2", steps: [ { icon: settingsIcon, content: "Unveiled new AI-powered robotics platform for manufacturing.", }, { icon: sparklesIcon, content: "Introduced machine learning models for sustainable energy solutions.", }, ], }, ];</script>
<div class="bg-card w-full max-w-6xl rounded-[2rem] border px-4 py-10 shadow-sm sm:px-8"> <ArcTimeline class="[--description-color:#555555] [--icon-active-color:#555555] [--icon-inactive-color:#a3a3a3] [--placeholder-line-color:#a1a1a1] [--step-line-active-color:#888888] [--step-line-inactive-color:#b1b1b1] [--time-active-color:#555555] [--time-inactive-color:#a3a3a3] dark:[--description-color:#d4d4d4] dark:[--icon-active-color:#d4d4d4] dark:[--icon-inactive-color:#a3a3a3] dark:[--placeholder-line-color:#737373] dark:[--step-line-active-color:#9780ff] dark:[--step-line-inactive-color:#737373] dark:[--time-active-color:#d4d4d4] dark:[--time-inactive-color:#a3a3a3]" data={TIMELINE} defaultActiveStep={{ time: "2025 Q2", stepIndex: 0 }} arcConfig={{ circleWidth: 4500, angleBetweenMinorSteps: 0.4, lineCountFillBetweenSteps: 8, boundaryPlaceholderLinesCount: 50, }} /></div>
{#snippet rocketIcon()} <RocketIcon class="size-5" />{/snippet}
{#snippet boxIcon()} <BoxIcon class="size-5" />{/snippet}
{#snippet lockIcon()} <LockIcon class="size-5" />{/snippet}
{#snippet globeIcon()} <GlobeIcon class="size-5" />{/snippet}
{#snippet settingsIcon()} <SettingsIcon class="size-5" />{/snippet}
{#snippet zapIcon()} <ZapIcon class="size-5" />{/snippet}
{#snippet starIcon()} <StarIcon class="size-5" />{/snippet}
{#snippet sparklesIcon()} <SparklesIcon class="size-5" />{/snippet}Installation
Copy the Source Code
Copy and paste the following code into your project:
<script lang="ts"> import type { Snippet } from "svelte"; import { cn } from "#lib/utils.js"; import type { ArcTimelineItem, ArcTimelineProps, ArcTimelineRenderable, ArcTimelineStep, } from "./types";
interface TimelineStepMeta { line: ArcTimelineItem; step: ArcTimelineStep; lineIndex: number; stepIndex: number; angle: number; isFirstStep: boolean; isLastStep: boolean; }
let { ref = $bindable(null), class: className, data, arcConfig = {}, defaultActiveStep = {}, ...restProps }: ArcTimelineProps = $props();
let circleWidth = $derived(arcConfig.circleWidth ?? 5000); let angleBetweenMinorSteps = $derived(arcConfig.angleBetweenMinorSteps ?? 0.35); let lineCountFillBetweenSteps = $derived(arcConfig.lineCountFillBetweenSteps ?? 10); let boundaryPlaceholderLinesCount = $derived(arcConfig.boundaryPlaceholderLinesCount ?? 50);
function getInitialCircleRotation() { const defaultActiveTime = defaultActiveStep.time ?? data[0]?.time; const defaultActiveStepIndex = defaultActiveStep.stepIndex ?? 0;
let count = 0;
for (const timelineItem of data) { if (timelineItem.time === defaultActiveTime) { count += defaultActiveStepIndex; break; }
count += timelineItem.steps.length; }
return ( -count * angleBetweenMinorSteps * (lineCountFillBetweenSteps + 1) - angleBetweenMinorSteps * boundaryPlaceholderLinesCount ); }
let circleContainerRotateDeg = $state(getInitialCircleRotation());
let timelineSteps = $derived.by((): TimelineStepMeta[] => { const steps: TimelineStepMeta[] = []; let stepsBeforeCurrentLine = 0;
data.forEach((line, lineIndex) => { line.steps.forEach((step, stepIndex) => { const angle = angleBetweenMinorSteps * (lineCountFillBetweenSteps + 1) * (stepsBeforeCurrentLine + stepIndex) + angleBetweenMinorSteps * boundaryPlaceholderLinesCount;
steps.push({ line, step, lineIndex, stepIndex, angle, isFirstStep: lineIndex === 0 && stepIndex === 0, isLastStep: lineIndex === data.length - 1 && stepIndex === line.steps.length - 1, }); });
stepsBeforeCurrentLine += line.steps.length; });
return steps; });
function getPlaceholderAngles(isFirstStep: boolean, isLastStep: boolean, angle: number) { const count = isLastStep || isFirstStep ? boundaryPlaceholderLinesCount : lineCountFillBetweenSteps;
return Array.from({ length: count }, (_, index) => isFirstStep ? index * angleBetweenMinorSteps : angle + (index + 1) * angleBetweenMinorSteps ); }
function getSnippet(value: ArcTimelineRenderable): Snippet | null { return typeof value === "function" ? value : null; }
function getPrimitiveContent(value: ArcTimelineRenderable): string | number | null { return typeof value === "string" || typeof value === "number" ? value : null; }
function isActive(angle: number) { return Math.abs(angle + circleContainerRotateDeg) < 0.01; }
function setActiveAngle(angle: number) { circleContainerRotateDeg = -angle; }
function handleStepKeydown(event: KeyboardEvent, angle: number) { if (event.key === "Enter" || event.key === " ") { event.preventDefault(); setActiveAngle(angle); } }</script>
<div bind:this={ref} class={cn("relative h-[380px] w-full overflow-hidden", className)} {...restProps}> <div class="absolute top-28 left-1/2 aspect-square origin-center rounded-full transition-all duration-500 ease-in-out" style:transform={`translateX(-50%) rotate(${circleContainerRotateDeg}deg)`} style:width={`${circleWidth}px`} > {#each timelineSteps as timelineStep (`${timelineStep.lineIndex}-${timelineStep.stepIndex}`)} {@const active = isActive(timelineStep.angle)} {@const iconSnippet = getSnippet(timelineStep.step.icon)} {@const iconText = getPrimitiveContent(timelineStep.step.icon)} {@const contentSnippet = getSnippet(timelineStep.step.content)} {@const contentText = getPrimitiveContent(timelineStep.step.content)} {@const timeSnippet = getSnippet(timelineStep.line.time)} {@const timeText = getPrimitiveContent(timelineStep.line.time)}
{#if timelineStep.isFirstStep} {@const beforePlaceholderAngles = getPlaceholderAngles( true, false, timelineStep.angle )}
{#each beforePlaceholderAngles as fillAngle, fillIndex (`before-${fillIndex}`)} <div class="absolute top-0 left-1/2 h-[34px] w-[1px] -translate-x-1/2" style:transform-origin={`50% ${circleWidth / 2}px`} style:transform={`rotate(${fillAngle}deg)`} > <div class="h-full w-full bg-[var(--placeholder-line-color,#a1a1a1)] dark:bg-[var(--placeholder-line-color,#737373)]" style:transform-origin="center top" style:transform={`rotate(${-fillAngle - circleContainerRotateDeg}deg)`} ></div> </div> {/each} {/if}
<div class={cn( "absolute top-0 left-1/2 -translate-x-1/2 cursor-pointer transition-all duration-200", active ? "h-[120px] w-[2px]" : "h-16 w-[1.5px]" )} role="button" tabindex="0" style:transform-origin={`50% ${circleWidth / 2}px`} style:transform={`rotate(${timelineStep.angle}deg)`} onclick={() => setActiveAngle(timelineStep.angle)} onkeydown={(event) => handleStepKeydown(event, timelineStep.angle)} > <div class={cn( "h-full w-full transition-colors duration-200", active ? "bg-[var(--step-line-active-color,#888888)] dark:bg-[var(--step-line-active-color,#9780ff)]" : "bg-[var(--step-line-inactive-color,#b1b1b1)] dark:bg-[var(--step-line-inactive-color,#737373)]" )} style:transform-origin="center top" style:transform={`rotate(${-timelineStep.angle - circleContainerRotateDeg}deg)`} > <div class={cn( "absolute bottom-0 left-1/2 aspect-square -translate-x-1/2", active ? "translate-y-[calc(100%_+_14px)] scale-[1.2] text-[var(--icon-active-color,#555555)] dark:text-[var(--icon-active-color,#d4d4d4)]" : "translate-y-[calc(100%_+_4px)] scale-100 text-[var(--icon-inactive-color,#a3a3a3)] dark:text-[var(--icon-inactive-color,#a3a3a3)]" )} > {#if iconSnippet} {@render iconSnippet()} {:else if iconText !== null} {iconText} {/if} </div>
<p class={cn( "absolute bottom-0 left-1/2 line-clamp-3 flex w-[240px] -translate-x-1/2 translate-y-[calc(100%_+_42px)] items-center justify-center text-center text-sm transition-opacity duration-300 ease-in", "text-[var(--description-color,#555555)] dark:text-[var(--description-color,#d4d4d4)]", active ? "opacity-100" : "opacity-0" )} > {#if contentSnippet} {@render contentSnippet()} {:else if contentText !== null} {contentText} {/if} </p> </div>
{#if timelineStep.stepIndex === 0} <div class={cn( "absolute top-0 left-1/2 z-10 -translate-x-1/2 translate-y-[calc(-100%-24px)] whitespace-nowrap", active ? "text-[var(--time-active-color,#555555)] dark:text-[var(--time-active-color,#d4d4d4)]" : "text-[var(--time-inactive-color,#a3a3a3)] dark:text-[var(--time-inactive-color,#a3a3a3)]" )} > {#if timeSnippet} {@render timeSnippet()} {:else if timeText !== null} {timeText} {/if} </div> {/if} </div>
{@const afterPlaceholderAngles = getPlaceholderAngles( false, timelineStep.isLastStep, timelineStep.angle )}
{#each afterPlaceholderAngles as fillAngle, fillIndex (`after-${fillIndex}`)} <div class="absolute top-0 left-1/2 h-[34px] w-[1px] -translate-x-1/2" style:transform-origin={`50% ${circleWidth / 2}px`} style:transform={`rotate(${fillAngle}deg)`} > <div class="h-full w-full bg-[var(--placeholder-line-color,#a1a1a1)] dark:bg-[var(--placeholder-line-color,#737373)]" style:transform-origin="center top" style:transform={`rotate(${-fillAngle - circleContainerRotateDeg}deg)`} ></div> </div> {/each} {/each} </div></div> import type { Snippet } from "svelte";import type { HTMLAttributes } from "svelte/elements";import type { WithElementRef, WithoutChildren } from "#lib/utils.js";
export type ArcTimelineRenderable = Snippet | string | number | boolean | null | undefined;
export interface ArcTimelineStep { icon: ArcTimelineRenderable; content: ArcTimelineRenderable;}
export interface ArcTimelineItem { time: ArcTimelineRenderable; steps: ArcTimelineStep[];}
export interface ArcTimelineArcConfig { circleWidth?: number; angleBetweenMinorSteps?: number; lineCountFillBetweenSteps?: number; boundaryPlaceholderLinesCount?: number;}
export interface ArcTimelineDefaultActiveStep { time?: ArcTimelineItem["time"]; stepIndex?: number;}
export type ArcTimelineProps = WithoutChildren< WithElementRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>> & { data: ArcTimelineItem[]; arcConfig?: ArcTimelineArcConfig; defaultActiveStep?: ArcTimelineDefaultActiveStep;};import ArcTimeline from "./arc-timeline.svelte";export type { ArcTimelineArcConfig, ArcTimelineDefaultActiveStep, ArcTimelineItem, ArcTimelineProps, ArcTimelineRenderable, ArcTimelineStep,} from "./types";export { ArcTimeline };Folder Structure
src/ lib/ components/ magic/ arc-timeline/ arc-timeline.svelte types.ts index.tsInstall and integrate the Svelte component documented below.https://sv-animations.vercel.app/magic/docs/components/arc-timeline/llms.txt
Follow the guide's installation and usage instructions.Match the project's existing structure, imports, and styles.Keep changes scoped to the component and verify it works.Reply with a short bullet list of completed changes.Usage
<script lang="ts"> import { ArcTimeline } from "#lib/components/magic/arc-timeline/index.js";
const timeline = [ { time: "2026", steps: [{ icon: "1", content: "Project launched" }], }, ];</script>
<ArcTimeline data={timeline} />Examples
Product Roadmap
Mapped workflow pain points across 18 customer interviews.
Locked the core job-to-be-done and success metrics for v1.
Shipped an internal prototype for structured content generation.
Added telemetry, prompt versioning, and error reporting.
Opened a private beta with AI-assisted campaign drafts and tone presets.
Ran weekly release trains with guided feedback sessions.
Reduced generation latency by 38% before public launch.
Released self-serve onboarding, billing, and workspace templates.
Published customer stories and benchmark results on launch day.
Localized the editor for multilingual teams across new regions.
Launched a template marketplace for partner-built workflows.
Rolled out admin controls, approvals, and audit history.
Introduced automation recipes for briefs, ads, and landing pages.
Added event streaming hooks for enterprise analytics pipelines.
<script lang="ts"> import BoxIcon from "@lucide/svelte/icons/box"; import CalendarIcon from "@lucide/svelte/icons/calendar"; import GlobeIcon from "@lucide/svelte/icons/globe"; import RocketIcon from "@lucide/svelte/icons/rocket"; import SettingsIcon from "@lucide/svelte/icons/settings"; import SparklesIcon from "@lucide/svelte/icons/sparkles"; import StarIcon from "@lucide/svelte/icons/star"; import ZapIcon from "@lucide/svelte/icons/zap"; import { ArcTimeline, type ArcTimelineItem } from "$lib/components/magic/arc-timeline/index.js";
const ROADMAP: ArcTimelineItem[] = [ { time: "Research", steps: [ { icon: globeIcon, content: "Mapped workflow pain points across 18 customer interviews.", }, { icon: starIcon, content: "Locked the core job-to-be-done and success metrics for v1.", }, ], }, { time: "Alpha", steps: [ { icon: boxIcon, content: "Shipped an internal prototype for structured content generation.", }, { icon: settingsIcon, content: "Added telemetry, prompt versioning, and error reporting.", }, ], }, { time: "Beta", steps: [ { icon: sparklesIcon, content: "Opened a private beta with AI-assisted campaign drafts and tone presets.", }, { icon: calendarIcon, content: "Ran weekly release trains with guided feedback sessions.", }, { icon: zapIcon, content: "Reduced generation latency by 38% before public launch.", }, ], }, { time: "Launch Week", steps: [ { icon: rocketIcon, content: "Released self-serve onboarding, billing, and workspace templates.", }, { icon: starIcon, content: "Published customer stories and benchmark results on launch day.", }, ], }, { time: "Expansion", steps: [ { icon: globeIcon, content: "Localized the editor for multilingual teams across new regions.", }, { icon: boxIcon, content: "Launched a template marketplace for partner-built workflows.", }, { icon: settingsIcon, content: "Rolled out admin controls, approvals, and audit history.", }, ], }, { time: "Platform", steps: [ { icon: sparklesIcon, content: "Introduced automation recipes for briefs, ads, and landing pages.", }, { icon: zapIcon, content: "Added event streaming hooks for enterprise analytics pipelines.", }, ], }, ];</script>
<div class="bg-card w-full max-w-6xl rounded-[2rem] border px-4 py-10 shadow-sm sm:px-8"> <ArcTimeline class="[--description-color:#334155] [--icon-active-color:#0f172a] [--icon-inactive-color:#94a3b8] [--placeholder-line-color:#cbd5e1] [--step-line-active-color:#0f766e] [--step-line-inactive-color:#9ca3af] [--time-active-color:#0f172a] [--time-inactive-color:#94a3b8] dark:[--description-color:#cbd5e1] dark:[--icon-active-color:#ecfeff] dark:[--icon-inactive-color:#94a3b8] dark:[--placeholder-line-color:#334155] dark:[--step-line-active-color:#5eead4] dark:[--step-line-inactive-color:#475569] dark:[--time-active-color:#ecfeff] dark:[--time-inactive-color:#94a3b8]" data={ROADMAP} defaultActiveStep={{ time: "Launch Week", stepIndex: 0 }} arcConfig={{ circleWidth: 4100, angleBetweenMinorSteps: 0.42, lineCountFillBetweenSteps: 7, boundaryPlaceholderLinesCount: 40, }} /></div>
{#snippet rocketIcon()} <RocketIcon class="size-5" />{/snippet}
{#snippet boxIcon()} <BoxIcon class="size-5" />{/snippet}
{#snippet globeIcon()} <GlobeIcon class="size-5" />{/snippet}
{#snippet settingsIcon()} <SettingsIcon class="size-5" />{/snippet}
{#snippet sparklesIcon()} <SparklesIcon class="size-5" />{/snippet}
{#snippet starIcon()} <StarIcon class="size-5" />{/snippet}
{#snippet zapIcon()} <ZapIcon class="size-5" />{/snippet}
{#snippet calendarIcon()} <CalendarIcon class="size-5" />{/snippet}Props
Arc Timeline
The root timeline container that renders grouped milestone steps around a rotating arc.
| Name | Type | Default | Description |
|---|---|---|---|
class | ClassValue | "" | Additional CSS classes applied to the root container. |
ref | HTMLDivElement | null | null | Optional bindable reference to the root timeline element. |
data | ArcTimelineItem[] | required | Timeline groups and steps rendered around the arc. |
arcConfig | ArcTimelineArcConfig | {} | Overrides for circle size and line spacing. |
defaultActiveStep | ArcTimelineDefaultActiveStep | {} | Initial active milestone selected when the component mounts. |
Arc Timeline Item
A timeline group with a shared time label and one or more steps.
| Name | Type | Default | Description |
|---|---|---|---|
time | ArcTimelineRenderable | required | Label rendered above the first step in the group. Accepts a snippet or primitive value. |
steps | ArcTimelineStep[] | required | Milestone steps associated with the group. |
Arc Timeline Step
A single milestone marker rendered on the arc.
| Name | Type | Default | Description |
|---|---|---|---|
icon | ArcTimelineRenderable | required | Icon marker content. Accepts a snippet or primitive value. |
content | ArcTimelineRenderable | required | Step description shown for the active marker. Accepts a snippet or primitive value. |
Arc Timeline Arc Config
Controls the geometry and spacing of the arc.
| Name | Type | Default | Description |
|---|---|---|---|
circleWidth | number | 5000 | Diameter of the invisible circle used to position the arc lines. |
angleBetweenMinorSteps | number | 0.35 | Rotation increment in degrees between minor placeholder lines. |
lineCountFillBetweenSteps | number | 10 | Number of placeholder lines inserted between adjacent steps. |
boundaryPlaceholderLinesCount | number | 50 | Number of placeholder lines rendered before the first step and after the last step. |
Arc Timeline Default Active Step
Selects the milestone that should be active on first render.
| Name | Type | Default | Description |
|---|---|---|---|
time | ArcTimelineItem["time"] | data[0]?.time | Time group to activate. Primitive labels like strings are the most practical for matching. |
stepIndex | number | 0 | Index of the step within the matching time group. |