PressButton

A button that compresses slightly on press and settles with a tiny natural overshoot for a tactile, physical feel.

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/press-button

API Reference

PropTypeDefaultDescription
variant'primary' | 'secondary' | 'outline' | 'ghost''primary'Visual presentation style
size'sm' | 'md' | 'lg' | 'icon''md'Dimensions and typography scale
pressStrengthnumber0.04Compression amount on press (0-1, clamped 0.01-0.06)
fullWidthbooleanfalseStretches button to 100% width of parent container
disabledbooleanfalsePrevents interaction and applies 30% disabled opacity