Skip to content

Button

An interactive element used to trigger user actions.

Example

An interactive element used to trigger user actions.

import { Button } from "@yummacss/ui";
export default function Page() {
return (
<Button variant="base" size="md">
Login
</Button>
);
};

Usage

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

API reference

variant

Default value is base

(property) variant?: "link" | "destructive" | "base" | "ghost" | "outlined" | null | undefined

size

Default value is md

(property) size?: "sm" | "md" | "lg" | null | undefined

Custom styling

Apply custom styles to the <Button> component.

import { Button } from "@yummacss/ui";
<Button className="...">
...
</Button>

Extend properties

Extend the <Button> component with the native <button> HTML attributes.

import { Button } from "@yummacss/ui";
<Button {...props}>
...
</Button>