Button

A button component for triggering actions in your application.

Preview

Usage

import { Home } from "lucide-react";
import { Button } from "@vitnode/core/components/ui/button";
<Button>
  <Home />
  Default
</Button>

Use the render prop to swap the underlying element or compose the button with another component, such as a link. Set nativeButton={false} when the rendered element is not a native <button>.

import Link from "next/link";

<Button nativeButton={false} render={<Link href="/home" />}>
  Home
</Button>

Loading

Pass isLoading to render a spinner and disable the button while an action is in progress.

<Button isLoading>Save changes</Button>

Props

Prop

Type

API Reference

Base UI - Button

On this page