Button
A button allows a user to perform an action, with mouse, touch, and keyboard interactions.
Installation
Install via VScode or copy and paste the code below into a new file, preferably in a folder at components/base.
BaseLayer
Examples
Default
bl-button
import { Button } from "@/components/base/button";
export const ButtonExample = () => <Button>Button</Button>;
Icon Button
bl-button-icon
import { Button } from "@/components/base/button";
import { Heart } from "lucide-react";
export const ButtonIcon = () => (
<Button>
<Heart className="mr-2" />
Icon Button
</Button>
);
Loader Button
bl-button-loader
import { Button } from "@/components/base/button";
import { Loader } from "lucide-react";
export const ButtonLoader = () => (
<Button isDisabled>
<Loader className="mr-2 h-4 w-4 animate-spin" />
Loading
</Button>
);
Variants
Intent
import { Button } from "@/components/base/button";
<Button intent="primary">Primary</Button>
<Button intent="secondary">Accent</Button>
State
import { Button } from "@/components/base/button";
<Button state="filled">Filled</Button>
<Button state="soft">Soft</Button>
<Button state="ghost">Ghost</Button>
<Button state="outline">Outline</Button>
Sizes
import { Button } from "@/components/base/button";
<Button size="sm">sm</Button>
<Button size="md">md</Button>
<Button size="lg">lg</Button>