Discover our comprehensive collection of production-ready components. Browse through the file tree to explore different implementations, patterns, and best practices for building modern web applications.
src
components
ui
1import * as React from "react"2import { Slot } from "radix-ui"3import { cva, type VariantProps } from "class-variance-authority"4import { cn } from "@/lib/utils"5 6const buttonVariants = cva(7 "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium",8 {9 variants: {10 variant: {11 default: "bg-primary text-primary-foreground",12 destructive: "bg-destructive text-white",13 outline: "border bg-background",14 secondary: "bg-secondary text-secondary-foreground",15 ghost: "hover:bg-accent",16 },17 },18 }19)20 21function Button({ className, variant, ...props }) {22 return (23 <button24 className={cn(buttonVariants({ variant }), className)}25 {...props}26 />27 )28}29 30export { Button, buttonVariants }