Button

A clickable button component with ASCII styling that maintains the retro aesthetic.

Docs•API Reference

Installation

npx shadcn@latest add accordion

Usage

import { AsciiButton } from 'react-ascii-ui';

export default function Example() {
  return (
    <AsciiButton onClick={() => console.log('Clicked!')}>
      Click me
    </AsciiButton>
  );
}

Examples

Default

<AsciiButton>Default Button</AsciiButton>

Disabled

<AsciiButton disabled>Disabled Button</AsciiButton>

With Click Handler

<AsciiButton onClick={() => alert('Button clicked!')}>
  Click Me
</AsciiButton>

API Reference

Props

PropTypeDefaultDescription
childrenReact.ReactNode-The content of the button
onClick() => void-Function to call when button is clicked
disabledbooleanfalseWhether the button is disabled
classNamestring-Additional CSS classes

AsciiButton extends all HTML button attributes and React.ButtonHTMLAttributes.