Window
aqua/windowFreeComponent
Brushed metal window chrome with traffic lights and a titlebar.
Live preview
live · rendered by the registry
Rendered by aqua on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://aqua.duca.dev/r/window.jsonSource
1import * as React from "react"23import { cn } from "@/lib/utils"45function Window({ className, ...props }: React.ComponentProps<"div">) {6 return (7 <div8 data-slot="window"9 className={cn(10 "overflow-hidden rounded-[10px] bg-[repeating-linear-gradient(180deg,rgba(255,255,255,0.06)_0px,rgba(255,255,255,0.06)_1px,rgba(0,0,0,0.03)_1px,rgba(0,0,0,0.03)_2px),linear-gradient(180deg,#d9dbde_0%,#c3c6ca_100%)] shadow-[inset_0_1px_0_rgba(255,255,255,0.7),0_0_0_1px_rgba(40,45,55,0.35),0_18px_40px_rgba(30,40,60,0.3),0_4px_10px_rgba(30,40,60,0.2)]",11 className12 )}13 {...props}14 />15 )16}1718function WindowTitlebar({ className, ...props }: React.ComponentProps<"div">) {19 return (20 <div21 data-slot="window-titlebar"22 className={cn("relative flex h-[34px] items-center px-3", className)}23 {...props}24 />25 )26}2728function WindowTitle({ className, ...props }: React.ComponentProps<"span">) {29 return (30 <span31 data-slot="window-title"32 className={cn(33 "pointer-events-none absolute inset-x-0 text-center text-[13px] font-semibold text-[#43484f] [text-shadow:0_1px_0_rgba(255,255,255,0.6)]",34 className35 )}36 {...props}37 />38 )39}4041const LIGHT_TINTS = {42 red: "border-[#c93a2b] bg-[radial-gradient(circle_at_50%_30%,#ff8a80,#ec4c3c_70%)]",43 yellow: "border-[#cf9325] bg-[radial-gradient(circle_at_50%_30%,#ffe082,#f5b731_70%)]",44 green: "border-[#43a12f] bg-[radial-gradient(circle_at_50%_30%,#b9f6a5,#56c93f_70%)]",45} as const4647function TrafficLights({ className, ...props }: React.ComponentProps<"div">) {48 const lights = Object.keys(LIGHT_TINTS) as Array<keyof typeof LIGHT_TINTS>4950 return (51 <div52 data-slot="traffic-lights"53 className={cn("z-10 flex gap-2", className)}54 {...props}55 >56 {lights.map((tint) => (57 <span58 key={tint}59 className={cn(60 "relative size-[13px] rounded-full border shadow-[inset_0_1px_2px_rgba(0,0,0,0.25),0_1px_0_rgba(255,255,255,0.5)] after:absolute after:left-[3px] after:right-[3px] after:top-px after:h-[5px] after:rounded-full after:bg-[linear-gradient(180deg,rgba(255,255,255,0.9),rgba(255,255,255,0.15))] after:content-['']",61 LIGHT_TINTS[tint]62 )}63 />64 ))}65 </div>66 )67}6869function WindowContent({ className, ...props }: React.ComponentProps<"div">) {70 return (71 <div72 data-slot="window-content"73// … truncated
Files it writes
More from aqua
All 26 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alertalert | aqua | Components | Free | 1 dep | |
| Avataravatar | aqua | Components | Free | 1 dep | |
| Badgebadge | aqua | Components | Free | 2 deps | |
| Buttonbutton | aqua | Components | Free | 2 deps | |
| Chat Bubblechat-bubble | aqua | Components | Free | no deps | |
| Checkboxcheckbox | aqua | Components | Free | 2 deps | |
| Code Blockcode-block | aqua | Components | Free | 2 deps · 2 files | |
| Cursorcursor | aqua | Components | Free | no deps |
