Button

Button

The Button component implements iOS-style states with support for custom elastic physics, 3D specular light reflections, and tactile spring scaling.

Preview
Configuration
Magnetic Physics Pulls button towards cursor elastic-wise
Haptic Elastic Scale Squeezes on holding and click actions
Specular Highlight Simulates light reflection angles
Disabled State Freezes interaction handlers
Installation
npx shadcn-svelte@latest add https://ui.grgurevic.click/r/button.json
Svelte Composition Code
<script lang="ts">
	import { Button } from "$lib/components/ui/button";
</script>

<Button>
	Interactive Button
</Button>

API & Props Reference

PropTypeDefaultDescription
variant"prominent" | "bordered" | "secondary" | "translucent" | "ghost" | "destructive""prominent"Visual configuration style.
size"xs" | "sm" | "default" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"Sizing dimensions.
magneticbooleantrueEnables cursor gravity elastic pulling.
scalebooleantrueEnables 3D elastic spring compression on clicks.
specularbooleantrueEnables dynamic light highlight reflection overlay.
hrefstringundefinedOptional URL path. If provided, renders an anchor link styled like a button.