A styled button component with size and variant variants for React applications.
// Source: https://github.com/reliverse/relivator | License: MIT | Copyright 2025 Nazar Kornienko (blefnk), Reliverse
// Provided via justclaw.it.com; keep this notice with the code.
import type * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "~/lib/cn";
const buttonVariants = cva(
`
inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm
font-medium whitespace-nowrap shadow-sm transition-all duration-200
ease-in-out outline-none
hover:shadow-md
focus:shadow-lg
focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/60
active:shadow
disabled:pointer-events-none disabled:opacity-50
aria-invalid:border-destructiv
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key