Skip to content
VenusUI
Get started

Slide Arrow Button

A pill button whose arrow slides in as the label moves aside on hover.

Preview

Installation

npx shadcn@latest add @venusui/slide-arrow-button

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/slide-arrow-button.tsx

Usage

The code behind the preview above.

slide-arrow-button-demo.tsx

import { SlideArrowButton } from "@/components/ui/slide-arrow-button"

export default function SlideArrowButtonDemo() {
  return <SlideArrowButton>Explore templates</SlideArrowButton>
}

API reference

PropTypeDefaultDescription
iconReactNodearrowIcon that slides in.
type"button" | "submit" | "reset""button"Defaults to button so it never submits a form by accident.

All <button> props, including onClick, disabled and ref.

Requirements

  • lucide-react for the default arrow, Tailwind CSS v4. Works in Server Components.

Customization

  • Pass any icon, e.g. icon={<Download />} for a download action.
  • For a filled look, add className="bg-primary text-primary-foreground hover:bg-primary/90".

Accessibility

  • The icon is decorative; the label names the button.
  • The same movement happens on keyboard focus, and is skipped with reduced motion.

Troubleshooting

The label is clipped on hover.
The button has fixed horizontal padding; very long labels need more px-*.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A button with a light that keeps circling its border.

Loading preview

A heart toggle that pops and bursts when liked, with an optional count.

Loading preview

A button that sends a ripple out from where it was pressed.