Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

404 B
Raw Blame
'use client'

import { useState } from 'react'

export function ClickCounter() {
  const [count, setCount] = useState(0)

  return (
    <button
      tabIndex={0}
      onClick={() => setCount(count + 1)}
      className="whitespace-nowrap rounded-lg bg-gray-700 px-3 py-1 text-sm font-medium tabular-nums text-gray-100 hover:bg-gray-500 hover:text-white"
    >
      {count} Clicks
    </button>
  )
}