Component

Button

A familiar shadcn-style button, included so the unreasonable components have something dependable to use.

01 / Preview

Try it yourself.

Preview Ready

02 / Usage

Put it somewhere.

example.tsxTSX
import { Button } from "gra-ui";
import "gra-ui/styles.css";

export function Example() {
  return <Button variant="outline">A regular button</Button>;
}

03 / API

Small surface area.

PropTypeDescription
childrenReactNodeThe button content.
variant"default" | "secondary" | "outline" | "ghost" | "destructive" | "link"The visual treatment.
size"default" | "sm" | "lg" | "icon"The button dimensions.
asChildbooleanRender the child element instead of a button.
...propsButtonHTMLAttributesNative button attributes are forwarded.