Clevision

Buttons

Buttons 16

About

Here is Buttons Components

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Buttons to your project and fits it to your theme.

Code

How Buttons is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client'

import { useState } from 'react'

import { CheckIcon, CopyIcon } from 'lucide-react'

import { Button } from '@/components/ui/button'

import { cn } from '@/lib/utils'

const ButtonCopyStateDemo = () => {
  const [copied, setCopied] = useState<boolean>(false)

  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText('Thank you for using Shadcn Studio!')
      setCopied(true)
      setTimeout(() => setCopied(false), 1500)
    } catch (err) {
      console.error('Failed to copy text: ', err)
    }
  }

  return (
    <Button variant='outline' className='btn relative disabled:opacity-100' onClick={handleCopy} disabled={copied}>
      <span className={cn('transition-all', copied ? 'scale-100 opacity-100' : 'scale-0 opacity-0')}>
        <CheckIcon className='stroke-green-600 dark:stroke-green-400 ' size={17} />
      </span>
      <span className={cn('absolute left-4 transition-all', copied ? 'scale-0 opacity-0' : 'scale-100 opacity-100')}>
        <CopyIcon size={17} />
      </span>
      {copied ? 'Copied!' : 'Copy'}
    </Button>
  )
}

export default ButtonCopyStateDemo

More by Clevision

View all
  • Calendar

    Calendar

    106
  • Card Studio

    Card Studio

    99
  • Collapsible

    Collapsible

    43
  • Button Group

    Button Group

    37
  • Radio Group 1

    Radio Group 1

    30
  • Combobox

    Combobox

    27
  • Basic Avatar

    Basic Avatar

    24
  • Switch

    Switch

    23

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    6
  • Button

    Button

    14
  • Button

    Button

    32
  • Split Button

    Split Button

    32
  • App Store Button

    App Store Button

    454