Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

1.5 KB
Raw Blame
---
title: Interactive Hover Button
date: 2024-12-17
description: A visually engaging button component that responds to hover with dynamic transitions, adapting smoothly between light and dark modes for enhanced user interactivity.
author: aayushbharti
published: true
---

<ComponentPreview name="interactive-hover-button-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

```bash
npx shadcn@latest add @magicui/interactive-hover-button
```

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="interactive-hover-button" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>

## Usage

```tsx showLineNumbers
import { InteractiveHoverButton } from "@/components/ui/interactive-hover-button"
```

```tsx showLineNumbers
<InteractiveHoverButton>Interactive Hover Button</InteractiveHoverButton>
```

## Props

| Prop        | Type     | Default  | Description                                   |
| ----------- | -------- | -------- | --------------------------------------------- |
| `text`      | `string` | `Button` | The text to be displayed inside the button    |
| `className` | `string` | `-`      | Additional class names to style the component |

## Credits

- Credit to [@AayushBharti](https://github.com/AayushBharti)