C
CanxJS
v1.6.2
  • Learn
  • Blog
  • Showcase
C
CanxJS

Ultra-fast async MVC backend framework for Bun. Build production-ready APIs with elegance and speed.

Resources

  • Documentation
  • Learn
  • Blog
  • Showcase

Documentation

  • Introduction
  • Installation
  • Core Concepts
  • CLI Commands
  • API Reference

Legal

  • Privacy Policy
  • Terms of Service

© 2026 CanxJS. All rights reserved.

Built with ❤️ for Candra Kirana

  • Installation
  • Button
  • Input
  • Badge
  • Card
  • Alert
  • Label
  • Table
  • Modal

Button

Highly interactive button component with support for multiple variants, sizes, and states.

Installation

bash
npx canx-ui add button

Usage

tsx
import { Button } from "@/components/ui/button";

export default function Demo() {
  return (
    <div className="flex flex-wrap gap-4">
      <Button variant="default">Default</Button>
      <Button variant="secondary">Secondary</Button>
      <Button variant="destructive">Destructive</Button>
      <Button variant="outline">Outline</Button>
      <Button variant="ghost">Ghost</Button>
      <Button variant="link">Link</Button>
    </div>
  );
}

Props

PropTypeDefaultDescription
variant"primary" | "secondary" | "destructive" | "outline" | "ghost" | "link""default"Use the "default", "destructive", "outline", "secondary", "ghost", or "link" variant.
size"default" | "sm" | "lg" | "icon""default"Use "default", "sm", "lg", or "icon" sizes.
asChildbooleanfalseMerge props onto the immediate child.