Love This UI? Help It Grow and Reach More Developers Worldwide

Retro Button Components

A comprehensive collection of retro-styled button components with hard shadows, vibrant colors, and smooth hover animations. Perfect for modern applications with a nostalgic twist.

Installation

Loading...
npx shadcn@latest add retroButton.json

Basic Usage

Loading...

API Reference

Props

PropTypeDefaultDescription
variant"default" | "secondary" | "outline" | "link""default"Button style variant
size"sm" | "md" | "lg" | "icon""md"Button size
loadingbooleanfalseShows loading spinner when true
disabledbooleanfalseDisables the button
classNamestring-Additional CSS classes
childrenReactNode-Button content

Variants

  • default: Primary action button with bright green background and hard shadow
  • secondary: Alternative styling with gray background
  • outline: Transparent button with colored border that fills on hover
  • link: Minimal styling for text-based actions

Sizes

  • sm: Small button (px-4 py-2, text-sm)
  • md: Medium button (px-6 py-2.5, text-base)
  • lg: Large button (px-8 py-4, text-lg)
  • icon: Square button for icons (h-12 w-12)

Examples

Default Buttons

Primary action buttons with the signature retro styling and hard shadow effects.

Loading...

Secondary Buttons

Alternative styling for secondary actions with gray background.

Loading...

Outline Buttons

Transparent buttons with colored borders that fill on hover.

Loading...

Icon Buttons

Square buttons designed specifically for icons and single actions.

Loading...

Minimal styling for text-based actions and navigation.

Loading...

Loading States

Interactive buttons with loading spinners and disabled states during async operations.

Loading...

Buttons with Icons

Combining icons with text for enhanced user experience and visual clarity.

Loading...

Form Actions

Common button combinations used in forms and dialogs.

Loading...

Size Comparison

All available button sizes side by side for easy comparison.

Loading...

Interactive Demo

Try clicking these buttons to see the retro hover and click animations in action.

Default button with shadow animation

Outline button with fill animation

Secondary button with smooth transitions

Styling

The retro button uses a hard shadow effect that moves when hovered, creating a distinctive 3D appearance. The color scheme features:

  • Primary Color: #00ff84 (bright green)
  • Text Color: #000000 (black on light backgrounds)
  • Border: 2px solid #000000 (black border)
  • Shadow: 4px 4px 0px 0px #000000 (hard black shadow)

Dark Mode Support

The component automatically adapts to dark mode with white shadows instead of black ones.

Accessibility

  • All buttons include proper ARIA labels when used as icon buttons
  • Focus states are clearly visible
  • Disabled states are properly communicated to screen readers
  • Color contrast meets WCAG guidelines

Best Practices

  1. Use variant="default" for primary actions
  2. Use variant="secondary" for secondary actions
  3. Use variant="outline" for less prominent actions
  4. Use variant="link" for navigation or text-based actions
  5. Always provide aria-label for icon-only buttons
  6. Use the loading prop for async operations
  7. Combine with icons using the gap-2 className for proper spacing