Murasaki
Components

Button

Displays a button or a component that looks like a button.

Usage

import { Button } from "@murasakijs/ui";
<Button>Button</Button>

Variants

Use the variant and size props to change a button's appearance.

API Reference

Props

PropTypeDefault
variant"default" | "secondary" | "outline" | "ghost" | "destructive" | "link""default"
size"default" | "sm" | "lg" | "icon""default"
asChildbooleanfalse

Button uses React Aria's press and focus-visible behavior. asChild renders the child element instead of a <button>, so button styles can be applied to e.g. a router Link.

Improve this page on GitHub

On this page