Spelte

Open Github

Pop Button

A playful 3D-style button with push-down animation effect.

Installation

pnpm dlx shadcn-svelte@latest add https://spelte.dev/r/pop-button.json

Font Setup (Optional)

To use the playful DynaPuff font, add it to your app:

<!-- app.html or +layout.svelte -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=DynaPuff&display=swap" rel="stylesheet">
/* app.css */
:root {
  --font-pop: 'DynaPuff', cursive;
}

Props

PropTypeDefaultDescription
childrenSnippetContent to display inside the button
color"default" | "blue" | "purple" | "pink" | "red" | "orange" | "yellow" | "green" | "teal" | "cyan" | ..."default"Button color
size"sm" | "default" | "lg""default"Button size
disabledbooleanfalseWhether the button is disabled
onclick(event: MouseEvent) => voidClick event handler
hrefstringRenders as <a> link when set
classstringAdditional CSS classes