Pixelated Button
A highly customizable, complex 3D pixel-art button featuring floating particles, CRT scanlines, and programmatic hue shifts.
Installation
npx raya-ui@latest add pixelated-buttonFile Structure
your-project
components
ui
pixelated-button
PixelatedButton.vue
API Reference
Props
huenumber350Base hue color (0-360) used to dynamically calculate the complex 3D shading palette.
labelstring"START"The large, primary text displayed in the center of the button.
subLabelstring"GAME"The smaller subtitle text displayed beneath the main label.
scalenumber1A multiplier to easily scale the entire button structure, including fonts and particle sizes.
showParticlesbooleantrueToggles the rendering of the animated floating background particles.
Slots
#icon-leftReplaces the default 3D star icon on the left side of the button.
#icon-rightReplaces the default 3D star icon on the right side of the button.
Inspired by 'wolf_3808'.
Settings
350
1.0x
source-code.vue
<script setup lang="ts">
import { PixelatedButton } from '@/components/ui/pixelated-button'
import { Crown } from 'lucide-vue-next'
</script>
<template>
<PixelatedButton>
<template #icon-left>
<Crown class="w-6 h-6 text-yellow-300" />
</template>
</PixelatedButton>
</template>