Deploy Pipeline
Installation
npx shadcn@latest add https://uibrik.com/r/deploy-pipeline.jsonInstall the packages
npm install motionAdd the cn helper
Imports
cnfrom@/lib/utils, whichshadcn initcreates. Add it by hand without shadcn.Copy the source into your project
components/uibrik/deploy-pipeline/deploy-pipeline.tsx"use client"; // A deploy card that runs itself: each step spins, ticks its own timer, then // checks off while a line fills down the rail to the next one. When the last // step lands the card turns Ready and shows the live URL. It runs when scrolled // into view and, if looping, resets and runs again. Reduced motion shows it finished. import { AnimatePresence, motion, useInView, useMotionValue, useReducedMotion } from "motion/react"; import { useEffect, useRef, useState } from "react"; import { cn } from "@/lib/utils"; const EASE_OUT: [number, number, number, number] = [0.23, 1, 0.32, 1]; const ROW = 44; export type DeployStep = { label: string; /** Seconds this step takes to run in the animation. */ duration?: number; }; export type DeployPipelineProps = { steps?: readonly DeployStep[]; /** Shown in the header, e.g. the branch or environment. */ environment?: string;
Adds the files to
components/uibrik/deploy-pipeline and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/deploy-pipeline.Props
DeployPipeline- environment
- Type string
- "Production"
- Header title, e.g. the environment or branch.
- commit
- Type string
- "a1f9c2e · Tighten checkout spacing"
- Commit line under the title.
- url
- Type string
- "acme.app"
- Address shown once ready.
- pace
- Type number
- 1
- Multiplies every step's duration.
- loop
- Type boolean
- true
- Run again after a pause once finished.
- hold
- Type number
- 3
- How long the finished card stays before rerunning.
- steps
- Type { label: string; duration?: number }[]
- 5 deploy steps
- The steps, in order. duration is seconds in the animation.
- className
- Type string
- –
- Classes for the card.