Skip to content

[bug]: Base UI Button being 'use client' means you can't import buttonVariants in non-client components #9428

@JamesSingleton

Description

@JamesSingleton

Describe the bug

Due to #9207 and the button component for Base UI being use client, you can no longer import buttonVariants and do className={buttonVariants()} on a <Link /> for example.

You end up getting

Attempted to call buttonVariants() from the server but buttonVariants is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.

Affected component/components

Button

How to reproduce

  1. Install the button component from Base UI
  2. Import buttonVariants from that file
  3. Add className={buttonVariants()} to something like next/link
  4. Render that component onto a page and run it in localhost

Codesandbox/StackBlitz link

No response

Logs

System Info

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:40 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 24.12.0
  npm: 11.6.2
  Yarn: 1.22.22
  pnpm: 10.20.0
Relevant Packages:
  next: 16.1.4
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions