AI Elements
UI library · Free
React AI interface components built on shadcn/ui: they help visualize messages, reasoning, and other AI application states.
Also known as: vercel/ai-elements; ai-elements; vercel-ai-elements; ai-component-library; shadcn-ui-ai

What you can use for free
Code and local use under Apache-2.0.
Paid features and costs
Computing resources, self-hosting, and external services are paid for separately if used.
Access and limitations
Code and local use under Apache-2.0. Computing resources, self-hosting, and external services are paid for separately if used.
Use cases
- Build an AI conversation interface
- Connect them to message streams and generation states from your own backend
Example workflow
A possible workflow; this is not a report of hands-on testing.
Build an AI conversation interface.
Before you start
- The component's design, states, and data.
- A compatible framework and the project's styles.
Steps
- Choose components for messages, input, and model response display.
- Connect them to message streams and generation states from your own backend.
- Configure styles and check empty, loading, and error states.
Check your result
- The keyboard, focus indicators, and a screen reader let users complete the action.
- The component works on a narrow screen and with long data values.
Choosing AI Elements
Build an AI conversation interface
Choose this when
- Build an AI conversation interface
- Connect them to message streams and generation states from your own backend
Requirements
- A prepared Next.js/React project with AI SDK and shadcn/ui; Tailwind configured with CSS variables.
Things to consider
- Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
- Terms of use: Apache-2.0 for the code; third-party components retain their own terms.
Frequently asked questions
What can you use for free in AI Elements?
Code and local use under Apache-2.0.
What additional costs might arise with AI Elements?
Computing resources, self-hosting, and external services are paid for separately if used.
What terms of use matter for AI Elements?
Apache-2.0 for the code; third-party components retain their own terms.
How do you get started with AI Elements?
Choose components for messages, input, and model response display. Connect them to message streams and generation states from your own backend. Configure styles and check empty, loading, and error states.
Does AI Elements itself provide a model and its responses?
These interface components are added to your code and work with AI SDK. Connecting a model and paying for inference are separate application concerns. The README recommends AI Gateway but does not declare it the only mandatory provider.
License
Apache-2.0 for the code; third-party components retain their own terms.
Apache 2.0 — permissive license with patent terms
You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.
License termsTechnologies and topics
- AI Elements
- UI
- Development