Gradient Sidebar
wise-ui/gradient-sidebarFreeComponent
A sidebar with animated gradient orb background and collapsible sections.
Live preview
live · rendered by the registry
Rendered by wise-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://wise-ui.com/r/gradient-sidebar.jsonSource
1"use client"23import * as React from "react"4import { motion, AnimatePresence } from "motion/react"5import { cn } from "@/lib/utils"67const EASE_OUT_QUART: [number, number, number, number] = [0.25, 1, 0.5, 1]89// ── Types ────────────────────────────────────────────────────────────1011interface GradientSidebarItem {12 id: string13 label: string14 icon?: React.ReactNode15 href?: string16 children?: GradientSidebarItem[]17 badge?: string | number18}1920interface GradientSidebarSection {21 title?: string22 items: GradientSidebarItem[]23}2425interface GradientSidebarProps {26 sections: GradientSidebarSection[]27 activeId?: string28 onItemClick?: (item: GradientSidebarItem) => void29 header?: React.ReactNode30 footer?: React.ReactNode31 defaultCollapsed?: boolean32 collapsed?: boolean33 onCollapsedChange?: (collapsed: boolean) => void34 width?: number35 collapsedWidth?: number36 colorA?: string37 colorB?: string38 colorC?: string39 overlayOpacity?: number40 className?: string41}4243// ── Gradient Background ──────────────────────────────────────────────4445function GradientBackground({46 colorA = "rgba(0,130,116,0.85)",47 colorB = "rgba(108,80,190,0.8)",48 colorC = "rgba(0,155,140,0.65)",49 overlayOpacity = 0.55,50}: {51 colorA?: string52 colorB?: string53 colorC?: string54 overlayOpacity?: number55}) {56 return (57 <>58 <div className="pointer-events-none absolute inset-0 overflow-hidden">59 <div60 className="absolute rounded-full"61 style={{62 width: "130%",63 height: "110%",64 top: "-40%",65 right: "-50%",66 background: `radial-gradient(circle, ${colorA} 0%, transparent 65%)`,67 filter: "blur(40px)",68 animation: "gradient-sidebar-blob-1 23s ease-in-out infinite",69 }}70 />71 <div72 className="absolute rounded-full"73 style={{74 width: "120%",75 height: "100%",76 bottom: "-35%",77 left: "-40%",78 background: `radial-gradient(circle, ${colorB} 0%, transparent 65%)`,79 filter: "blur(45px)",80 animation: "gradient-sidebar-blob-2 29s ease-in-out infinite",81 }}82 />83 <div84 className="absolute rounded-full"85 style={{86// … truncated
What it pulls in
npm packages
Files it writes
More from wise-ui
All 20 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Tabsanimated-tabs | wise-ui | Components | Free | 3 deps | |
| Border Beamborder-beam | wise-ui | Components | Free | 3 deps | |
| Data Tabledata-table | wise-ui | Components | Free | 3 deps | |
| Dockdock | wise-ui | Components | Free | 3 deps | |
| Dot Matrixdot-matrix | wise-ui | Components | Free | 2 deps | |
| Editable Texteditable-text | wise-ui | Components | Free | 4 deps | |
| Kanban Boardkanban-board | wise-ui | Components | Free | 6 deps | |
| Magnetic Buttonmagnetic-button | wise-ui | Components | Free | 3 deps |
