Button
rivelle/buttonFreeComponent
A tactile action primitive with a restrained accent edge and an optional signature shape.
Live preview
live · rendered by the registry
Rendered by rivelle on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://rivelle.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 "group relative isolate inline-flex shrink-0 items-center justify-center gap-2 overflow-hidden whitespace-nowrap rounded-xl text-sm font-semibold tracking-[-0.012em] outline-none transition-[color,background-color,border-color,box-shadow,transform] duration-300 ease-[cubic-bezier(.16,1,.3,1)] hover:-translate-y-0.5 active:translate-y-0 active:scale-[.985] disabled:pointer-events-none disabled:opacity-45 disabled:shadow-none focus-visible:ring-2 focus-visible:ring-ring/55 focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:transform-none motion-reduce:transition-none aria-invalid:ring-destructive/35 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:transition-transform [&_svg]:duration-300 group-hover:[&_svg]:translate-x-0.5",9 {10 variants: {11 variant: {12 default:13 "[background:var(--action-background)] [color:var(--action-foreground)] [box-shadow:var(--action-shadow)] hover:[background:var(--action-background-hover)] hover:[box-shadow:var(--action-shadow-hover)]",14 signature:15 "rounded-[0.9rem_0.9rem_0.9rem_0.35rem] bg-primary text-primary-foreground shadow-[0_10px_28px_-16px_var(--primary)] hover:bg-primary/90",16 prism:17 "rounded-lg border border-white/14 bg-[linear-gradient(112deg,color-mix(in_oklch,var(--primary)_88%,oklch(.58_.24_292)),var(--primary)_48%,color-mix(in_oklch,var(--primary)_80%,oklch(.68_.2_245)))] text-white shadow-[inset_0_1px_0_oklch(1_0_0/.22),0_10px_24px_-13px_var(--primary),0_2px_5px_-2px_color-mix(in_oklch,var(--primary)_70%,black)] before:absolute before:inset-x-2 before:top-0 before:-z-10 before:h-px before:bg-white/45 after:absolute after:inset-y-0 after:-left-1/2 after:-z-10 after:w-1/3 after:skew-x-[-22deg] after:bg-white/18 after:blur-sm after:transition-[left] after:duration-700 hover:brightness-105 hover:shadow-[inset_0_1px_0_oklch(1_0_0/.28),0_16px_32px_-15px_var(--primary),0_3px_7px_-3px_color-mix(in_oklch,var(--primary)_70%,black)] hover:after:left-[125%]",18 destructive:19 "bg-destructive text-destructive-foreground shadow-[0_8px_24px_-16px_var(--destructive)] hover:bg-destructive/90 focus-visible:ring-destructive/35",20 outline:21// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from rivelle
All 83 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | rivelle | Components | Free | 2 deps | |
| Alertalert | rivelle | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | rivelle | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | rivelle | Components | Free | 1 dep | |
| Avataravatar | rivelle | Components | Free | 1 dep | |
| Badgebadge | rivelle | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | rivelle | Components | Free | 2 deps | |
| Button Groupbutton-group | rivelle | Components | Free | no deps |
