Docs / Retro Pixel Button
Retro Pixel Button
A retro-styled animated button with a sliding pixel block, smooth transitions, and customizable colors.
Installation
npx rareui add retro-pixel-button
Usage
Import the component
import RetroPixelButton from '@/components/rareui/retro-pixel-button';Use in your application
export default function App() {
return (
<RetroPixelButton onClick={() => alert('Clicked!')}>
CLICK ME
</RetroPixelButton>
);
}Features
- Retro Aesthetic: Font-mono styling with pixelated arrow icon.
- Sliding Animation: Smooth spring-based expansion of the pixel block on hover.
- Icon Rotation: Pixelated arrow rotates 180° during the hover transition.
- Text Morphing: Text subtly blurs and shifts with a glitch-like effect.
- Fully Customizable: Control pixel block, base, and text colors independently.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | "TRY..." | The button text content. |
pixelColor | string | "orange" | Color of the sliding pixel block. |
baseColor | string | - | Optional background color override. |
textColor | string | - | Optional text color override. |
className | string | - | Additional CSS classes. |