Beej
Components

Button

A highly customizable button component with multi-variant and color scheme support built on Class Variance Authority (CVA).

Preview

Installation

You can install the component via the CLI or import it directly from the component package.

When initializing the project with beej it is already initialized
pnpm add @thanka-digital/beej-component

Usage

import { Button } from "@thanka-digital/beej-component";

export default function Example() {
  return (
    <Button colorscheme="primary" padding="base" variant="solid">Example Button</Button>
  );
}

Props Reference

Alongside all the in-built button component props we have some extra props that can be used to style the button component.

Prop

Type

Interactive Playground

Test combinations of different props to see how <Button> behaves in your project.

Live JSX Code
<Button
 colorscheme="primary"
 padding="base"
 children="Example Button"
 variant="solid"
/>

On this page