1. ButtonsRight caret
  2. Hover Expand Button

Buttons

Hover Expand Button

A button that expands when hovered.

"use client";
 
import { PlusIcon } from "lucide-react";
 
import { HoverExpandButton } from "@/registry/default/buttons/hover-expand-button";
 
export function HoverExpandButtonDemo() {
	return (
		<HoverExpandButton.Root>
			<HoverExpandButton.Icon render={<PlusIcon />} />
			<HoverExpandButton.Text>Button</HoverExpandButton.Text>
		</HoverExpandButton.Root>
	);
}

Installation

npm install @base-ui-components/react

Usage

import { Button } from "@base-ui-components/react";
import { PlusIcon } from "lucide-react";
<Button.Root>
  <Button.Icon render={<PlusIcon />} />
  Click me
</Button.Root>

Examples

Variants

"use client";
 
import { PlusIcon } from "lucide-react";
 
import { HoverExpandButton } from "@/registry/default/buttons/hover-expand-button";
 
export function HoverExpandButtonVariants() {
	return (
		<div className="flex gap-4">
			<HoverExpandButton.Root variant="filled">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root variant="stroke">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root variant="lighter">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root variant="ghost">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
		</div>
	);
}

Colors

"use client";
 
import { PlusIcon } from "lucide-react";
 
import { HoverExpandButton } from "@/registry/default/buttons/hover-expand-button";
 
export function HoverExpandButtonVariants() {
	return (
		<div className="flex gap-4">
			<HoverExpandButton.Root color="primary">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root color="default">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root color="success">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root color="warning">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root color="error">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
		</div>
	);
}

Sizes

"use client";
 
import { PlusIcon } from "lucide-react";
 
import { HoverExpandButton } from "@/registry/default/buttons/hover-expand-button";
 
export function HoverExpandButtonSizes() {
	return (
		<div className="flex gap-4">
			<HoverExpandButton.Root size="sm">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root size="md">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
			<HoverExpandButton.Root size="lg">
				<HoverExpandButton.Icon render={<PlusIcon />} />
				<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			</HoverExpandButton.Root>
		</div>
	);
}

Double Sided

"use client";
 
import { PlusIcon, SettingsIcon } from "lucide-react";
 
import { HoverExpandButton } from "@/registry/default/buttons/hover-expand-button";
 
export function HoverExpandButtonDoubleSided() {
	return (
		<HoverExpandButton.Root>
			<HoverExpandButton.Icon render={<PlusIcon />} />
			<HoverExpandButton.Text>Button</HoverExpandButton.Text>
			<HoverExpandButton.Icon className="ml-1" render={<SettingsIcon />} />
		</HoverExpandButton.Root>
	);
}

Composition

import { Button } from "@/registry/default/buttons/base";
import Link from "next/link";
 
export function BaseButtonComposition() {
	return <Button.Root render={<Link href="/" />}>I'm a Link</Button.Root>;
}
Copyright © 2025 Tailwind Labs Inc.·Trademark Policy