Button
aqua/buttonFreeComponent
Glossy Aqua pill button with gel highlight, in blue, capsule and red.
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/button.jsonSource
1import * as React from "react"2import { Slot } from "@radix-ui/react-slot"3import { cva, type VariantProps } from "class-variance-authority"45import { cn } from "@/lib/utils"67const buttonVariants = cva(8 "relative inline-flex shrink-0 select-none items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-full font-semibold tracking-[-0.01em] outline-none transition-[filter] before:pointer-events-none before:absolute before:left-[7%] before:right-[7%] before:top-[2px] before:h-[46%] before:rounded-full before:bg-[linear-gradient(180deg,rgba(255,255,255,0.95),rgba(255,255,255,0.08))] before:content-[''] hover:brightness-105 focus-visible:ring-[3px] focus-visible:ring-[var(--aqua-ring,#6cb0f7)]/70 active:translate-y-px active:brightness-95 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",9 {10 variants: {11 variant: {12 default:13 "border border-[var(--aqua-edge,#1c5fb8)] bg-[linear-gradient(180deg,var(--aqua-gel-hi,#b9dcff)_0%,var(--aqua-gel-light,#6cb0f7)_42%,var(--aqua-accent,#2f7de0)_50%,var(--aqua-gel-light,#4d9cf2)_78%,var(--aqua-gel-hi,#9fd7ff)_100%)] text-white shadow-[inset_0_1px_1px_rgba(255,255,255,0.75),inset_0_-3px_7px_rgba(255,255,255,0.6),0_1px_3px_rgba(20,60,130,0.35)] [text-shadow:0_-1px_1px_rgba(10,40,90,0.45)]",14 secondary:15 "border border-[#aeb3bc] bg-[linear-gradient(180deg,#fdfdfe_0%,#e4e7ec_48%,#d3d7de_52%,#eceef2_100%)] text-[#3a3f47] shadow-[inset_0_1px_1px_rgba(255,255,255,0.9),0_1px_2px_rgba(20,60,130,0.2)] before:opacity-60 [text-shadow:0_1px_0_rgba(255,255,255,0.8)]",16 destructive:17 "border border-[#a81f1f] bg-[linear-gradient(180deg,#ffc4c4_0%,#f7826c_42%,#e03a2f_50%,#f2604d_78%,#ffb09f_100%)] text-white shadow-[inset_0_1px_1px_rgba(255,255,255,0.75),inset_0_-3px_7px_rgba(255,255,255,0.5),0_1px_3px_rgba(130,20,20,0.35)] [text-shadow:0_-1px_1px_rgba(90,10,10,0.45)]",18 },19 size: {20 sm: "px-5 py-[7px] text-sm",21 default: "px-7 py-2.5 text-base",22 lg: "px-8 py-[13px] text-xl",23 },24 },25 defaultVariants: {26 variant: "default",27 size: "default",28 },29 }30)3132function Button({33 className,34 variant,35 size,36 asChild = false,37 ...props38}: React.ComponentProps<"button"> &39 VariantProps<typeof buttonVariants> & {40 asChild?: boolean41 }) {42 const Comp = asChild ? Slot : "button"4344 return (45 <Comp46 data-slot="button"47// … truncated
What it pulls in
npm packages
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 | |
| 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 | |
| Dialogdialog | aqua | Components | Free | 1 dep |
