Skip to content

feat(ai-elements): add support for Base UI version of shadcn/ui #489

Description

@Talha-Tahir2001

Summary

Currently, @vercel/ai-elements assumes a Radix-based setup for shadcn/ui primitives. Projects that have adopted or migrated to the Base UI edition of shadcn/ui face component/type mismatches and peer dependency conflicts when initializing or importing AI Elements.

Problem

  • The generated or copied components rely on @radix-ui/* primitives, while Base UI-based shadcn/ui projects use @base-ui-components/react.
  • Attempting to run npx ai-elements in a Base UI environment breaks design consistency and forces developers to pull in heavy, redundant Radix dependencies alongside Base UI.

Proposed Solution

  • Provide a CLI flag/option during setup (e.g., npx ai-elements --style base-ui or a prompt asking for the underlying primitive choice).
  • Export Base UI-compatible variant primitives for components like PromptInput, Conversation, Message, and tool call dialogs/popovers.

Environment

  • Framework: Next.js (App Router)
  • UI Libraries: @base-ui-components/react, shadcn/ui (Base UI version), tailwindcss (v4)
  • Package: @vercel/ai-elements

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions