components/Button.js

krouter · src/shared/components/Button.js · javascript · MIT
ui, tag:embed-classified

Highly customizable button component with variants, sizes, icons, and loading state for React applications.

// Source: https://github.com/sifxprime/krouter | License: MIT | Copyright 2026 Kodelyth AI Infrastructure
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

import { cn } from "@/shared/utils/cn";

const variants = {
  primary: "bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",
  secondary: "bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",
  outline: "border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40",
  ghost: "text-text-muted hover:bg-surface-2 hover:text-text-main",
  danger: "bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",
  success: "bg-green-600 hover:bg-green-700 text-white shadow-s

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key