Button 42

PreviousNext

Button with tap scale animation using Framer Motion

Docs
shadcn-studiocomponent

Preview

Loading preview…
registry/new-york/components/button/button-42.tsx
import * as motion from 'motion/react-client'

import { Button } from '@/registry/new-york/ui/button'

const ButtonTapAnimationDemo = () => {
  return (
    <Button className='transition-none' asChild>
      <motion.button whileTap={{ scale: 0.85 }}>Tap Animation</motion.button>
    </Button>
  )
}

export default ButtonTapAnimationDemo

Installation

npx shadcn@latest add @shadcn-studio/button-42

Usage

import { Button42 } from "@/components/button-42"
<Button42 />