All answers · AnimatedWebs products · 55 questions

shadcn components, answered.

This page answers common questions about shadcn/ui, shadcn registries, Tailwind CSS v4 and animated React components. It is for developers and AI builders who want to install, theme or generate animated components, including from the AnimatedWebs UI Library.

What is shadcn/ui?

shadcn/ui is an open source set of React components that you copy into your own project instead of installing as a package. Each component is plain TypeScript styled with Tailwind CSS and built on accessible primitives such as Radix UI, so you own and edit the code. The shadcn CLI adds components, their npm dependencies and their CSS variables for you. The AnimatedWebs UI Library publishes its animated components in the same registry format, so they install with the same CLI.

UI LibraryWhat is included

Is shadcn/ui a component library or something else?

shadcn/ui is a code distribution system rather than a normal component library. You do not add it as a dependency and import from node_modules. You run the CLI, and the component source lands in your own components folder, where you change it freely. The trade is that updates never arrive automatically, but nothing breaks when an upstream package changes. Other registries, including the AnimatedWebs component registry, use the same format to share their own components.

UI Library

What is a shadcn registry?

A shadcn registry is a set of JSON files, served over HTTP, that describe components the shadcn CLI can install. Each registry item lists its files with their content and target paths, its npm dependencies, other registry items it needs, and optional CSS variables. Anyone can host one, and the schemas are published at ui.shadcn.com/schema. AnimatedWebs runs a registry for its UI Library, with a public index at animatedwebs.com/r/index.json and source items for Pro members.

UI LibraryPricing

How do I install a component from a registry URL with npx shadcn add?

Pass the full item URL to the CLI, for example npx shadcn@latest add https://example.com/r/button.json. The CLI fetches the JSON, writes each file to its target path, installs the listed npm packages and merges any CSS variables into your stylesheet. Run npx shadcn@latest init first if the project has no components.json yet. For a registry that needs a token, set up a namespace in components.json instead, so the token travels in a request header and not in the URL.

UI Library install steps

How do I add a namespaced registry to components.json?

Add a registries object to components.json that maps a namespace, such as @acme, to a URL pattern with a name placeholder the CLI fills in. After that, npx shadcn@latest add @acme/card installs the card item from that registry. For a private registry, use the object form with a url and a headers field, and reference secrets as environment variables so they never sit in the file. AnimatedWebs Pro members add the @animatedwebs namespace this way.

UI Library

How do auth headers work in shadcn registries?

The shadcn CLI sends the headers you define for a registry in components.json with every request to that registry. Values can reference environment variables with the ${TOKEN_NAME} syntax, for example Authorization: Bearer ${REGISTRY_TOKEN}, and the CLI expands them at run time. Headers keep tokens out of URLs, shell history and copied commands. AnimatedWebs uses exactly this pattern: its registry reads ANIMATEDWEBS_TOKEN and sends it as an Authorization Bearer header, and it never accepts a token in the URL.

UI Library install stepsMCP server and API keys

How do I install AnimatedWebs components with shadcn?

Add the @animatedwebs registry to components.json, set ANIMATEDWEBS_TOKEN, then run npx shadcn@latest add @animatedwebs/ followed by the component name. The registry entry points at animatedwebs.com/r/ and sends Authorization: Bearer ${ANIMATEDWEBS_TOKEN} as a header. The token is an awd_ token or aw_ API key from the developer page of your AnimatedWebs dashboard. Installing source needs AnimatedWebs Pro. The exact config and command appear on every component page in the UI Library.

UI LibraryPricing

Does the AnimatedWebs shadcn registry need Pro?

Yes, installing component source from the AnimatedWebs registry needs AnimatedWebs Pro. The index at animatedwebs.com/r/index.json is public and lists every component with its title, tags, preview link and install command, but a source request without a token returns 401, and a free account gets 403. Pro includes the source code for every component in the UI Library. Live previews stay free for everyone.

PricingWhat is included

Can I put my AnimatedWebs token in the registry URL?

No. The AnimatedWebs registry never accepts a token in the URL. Send the token as an Authorization: Bearer header from components.json, reading it from the ANIMATEDWEBS_TOKEN environment variable. Tokens in URLs leak into shell history, proxy logs, browser history and screenshots of terminal commands. Keep the variable in a local env file that git ignores, and store it as a secret in CI.

UI Library install steps

Where do I get a token for the AnimatedWebs component registry?

You get it from the developer page of your AnimatedWebs dashboard while signed in. The registry accepts an awd_ token or an aw_ API key, and the account behind it must have AnimatedWebs Pro to receive source. Put the value in the ANIMATEDWEBS_TOKEN environment variable, which components.json reads for the Authorization header. The same aw_ key style also works for headless MCP clients.

MCP serverPricing

What is in the AnimatedWebs UI Library?

The AnimatedWebs UI Library at /ui holds animated components with live previews: shader backgrounds, hero sections, three.js scenes, text effects, buttons and interface pieces. Each component page plays the component live, lets you switch its variants, and shows a shadcn install command plus a ready prompt for MCP clients. Previews are free for everyone. AnimatedWebs Pro includes the source code for every component.

UI LibraryWhat is included

Are AnimatedWebs UI components free?

The previews are free and the source code is part of AnimatedWebs Pro. Anyone can open the UI Library, play every live preview and switch variants. Free accounts also get 5 AI component generations a day. Pro costs $19 a month or $149 a year and adds the source for every component, the shadcn registry and 100 generations a day. There is no free trial of Pro.

PricingUI Library

Can I preview an animated component before I pay?

Yes. Every component in the AnimatedWebs UI Library has a live preview that runs in your browser, and components with several variants let you switch between them on the same page. Many cards also show a silent preview loop. Viewing needs no purchase. You pay only if you want the source code, which comes with AnimatedWebs Pro.

UI Library

What does the AnimatedWebs AI UI generator do?

The AI UI generator at /ui/generate turns a one-sentence description into a working component in HTML or React with Tailwind CSS. Each result is rendered and checked before you see it. You can ask for three variations, refine the one you like in chat, then copy the code or download it. You sign in to generate. Free accounts get 5 generations a day and Pro accounts get 100.

AI UI generatorUI Library

How many AI component generations do I get per day on AnimatedWebs?

Free accounts get 5 AI component generations a day and AnimatedWebs Pro accounts get 100. The allowance resets at midnight UTC. Asking for three variations uses three generations, and refining a result also counts. The same daily allowance covers the generate and refine tools in the AnimatedWebs MCP server, so usage from your AI assistant and from the web page add up.

AI UI generatorPricing

What code does the AI UI generator output?

The AnimatedWebs AI UI generator outputs either a single HTML file or a React component styled with Tailwind CSS. React output targets React 19 and Tailwind CSS v4 with no other packages, using Google Fonts for type. You download the result as animatedwebs-component.html or Component.tsx, or copy it. Because it is one self-contained file, you can drop it into any React or static project.

AI UI generator

Can I save components I generate with AI?

Yes. Signed-in users of the AnimatedWebs AI UI generator have a private My components list where they can save results and open them again later. Saved React components open in the code view, and saved HTML components open with their preview. You can also delete saved items you no longer need, and the list stays private to your account.

AI UI generator

Can I send a generated component to Lovable, v0 or Bolt?

Yes. The AnimatedWebs AI UI generator has buttons that open Lovable, v0 or Bolt with a prompt that contains your component code. When the code is too long for that builder's link, the generator copies it to your clipboard and opens the builder so you can paste it into the chat. Either way the builder starts from the exact component you generated.

AI UI generatorTemplates for v0Templates for Lovable

What is the difference between copying a component and installing it with the shadcn CLI?

Copying means pasting the file yourself, while the CLI also handles everything around the file. With a copy, you install npm packages, add shared helpers, fix import aliases and add CSS variables by hand. The shadcn CLI reads the registry item and does all of that, writing files to the right target paths from components.json. Both methods end with source you own and can edit. AnimatedWebs Pro offers both: shadcn install or a source download.

UI Library

Should I copy UI components into my project or install them from npm?

Copy them when you want full control and plan to customize, and use an npm package when you want updates handled for you. Copied code, the shadcn model, never breaks from an upstream release, but you apply fixes yourself. A package keeps your repo smaller and updates with one command, but changing internals is hard. Animated components are usually heavily tuned per site, so the copy model fits them well.

UI LibraryMotion components

How do I update a shadcn component after installing it?

Run the add command again for the same item and let the CLI overwrite the files. The CLI asks before replacing files that already exist, and the --overwrite flag skips that prompt. Commit your work first so git shows exactly what changed, then merge your own edits back in. Because the code lives in your repo, an update is always a deliberate choice, never a surprise.

UI Library

What are animated React components?

Animated React components are components whose motion is part of the component itself, such as an entrance, a hover effect, a scroll reaction or a continuous shader. They are built with CSS transitions and keyframes, the Motion library, GSAP, or WebGL through three.js and React Three Fiber. Good ones respect prefers-reduced-motion and clean up timers and listeners when they unmount. The AnimatedWebs UI Library collects animated components you can preview live.

UI LibraryMotion components

Which animation library should I use for React components?

Use plain CSS for simple hovers and fades, Motion for layout, gesture and exit animations, GSAP for complex timelines and scroll work with ScrollTrigger, and three.js or React Three Fiber for 3D. Mixing is fine when each tool has a clear job. Pick the lightest option that does the effect. AnimatedWebs registry items list the npm packages each component imports, such as three or gsap, so shadcn installs them for you.

GSAP answersthree.js and WebGL answers

How do I make animated components respect prefers-reduced-motion?

Check the prefers-reduced-motion media query and show a calm or final state when it is set to reduce. In CSS, wrap motion in @media (prefers-reduced-motion: no-preference). In React with Motion, use the useReducedMotion hook. With GSAP, gsap.matchMedia() lets you register animations only for users who allow motion. Keep content readable without animation, and avoid parallax, pinning and auto-playing loops for those users.

Reduced motion guidePerformance answers

How do I keep animated components fast?

Animate transform and opacity, which the browser can composite, instead of layout properties like width or top. Pause offscreen animation with IntersectionObserver, cancel requestAnimationFrame loops on unmount, and load heavy pieces such as three.js scenes with a dynamic import. For WebGL, cap the device pixel ratio near 2 and dispose geometries and textures. Measure with real-user Core Web Vitals, where an INP under 200 ms counts as good.

Fast animated sites on phonesPerformance data

Do shadcn components work with Tailwind CSS v4?

Yes. The current shadcn CLI supports Tailwind CSS v4 and sets up new projects with it. Components use the CSS-first configuration, theme colors are defined as CSS variables in OKLCH, the @theme inline block maps them to utilities, and tw-animate-css replaces the older tailwindcss-animate plugin. Projects still on Tailwind v3 keep working with their existing setup. AnimatedWebs AI-generated React components also target Tailwind CSS v4.

AI UI generatorTailwind templates

What changed in Tailwind CSS v4?

Tailwind CSS v4 moved configuration into CSS. You start a stylesheet with @import "tailwindcss" and define tokens in an @theme block instead of a JavaScript config. Theme values are exposed as native CSS variables, content files are detected automatically, and a rewritten engine makes builds much faster. There is a first-party Vite plugin, @tailwindcss/vite, and a PostCSS plugin, @tailwindcss/postcss. Container queries are built in.

Tailwind templatesStyles

Do I still need a tailwind.config.js file in Tailwind CSS v4?

No, Tailwind CSS v4 does not need a tailwind.config.js file. Colors, fonts, spacing and breakpoints go in an @theme block inside your CSS, and content sources are found automatically. If you are migrating and want to keep an old JavaScript config, load it with the @config directive. For new projects, keeping everything in CSS is simpler and is what the shadcn CLI generates.

Styles

How do I define theme colors in Tailwind CSS v4?

Define them as CSS variables inside an @theme block, for example --color-brand: #c6ff3d. Tailwind then generates matching utilities such as bg-brand and text-brand, and the variable is available to plain CSS too. Fonts work the same way with --font-display. AnimatedWebs design systems ship a ready Tailwind v4 @theme block with tokens like --color-accent, --color-canvas and --color-ink plus display and body font tokens.

StylesDesign answers

What does @theme inline do, and why does shadcn use it?

@theme inline makes Tailwind utilities use the referenced value directly instead of pointing at a theme variable. shadcn defines colors such as --background in :root and again under .dark, then maps them with @theme inline as --color-background: var(--background). The bg-background utility then follows whichever value is active, so dark mode switches correctly. Without inline, the variable would resolve where the theme is defined.

Styles

How does dark mode work in shadcn/ui?

shadcn/ui switches themes with CSS variables. Light values sit in :root and dark values in a .dark class, and every component reads the variables, so adding the class to the html element flips the whole interface. Tailwind v4 projects declare the variant with @custom-variant dark (&:is(.dark *)). In Next.js, the next-themes package is the usual way to toggle the class and remember the choice.

Styles

What is components.json in shadcn?

components.json is the config file the shadcn CLI creates with init and reads on every add. It records the style, whether you use React Server Components and TypeScript, the Tailwind CSS file and base color, whether colors use CSS variables, import aliases for components, ui, lib, utils and hooks, the icon library, and any extra registries. Changing aliases there changes where installed files land. The AnimatedWebs registry is added in its registries field.

UI Library install steps

Can I use shadcn components with Vite instead of Next.js?

Yes. shadcn/ui has setup guides for Vite, Next.js, React Router, Astro, Laravel and other React setups, and the init command detects most frameworks. In Vite you configure the @ path alias in tsconfig and vite.config so imports resolve. Components marked with the use client directive work fine in Vite, which simply ignores it. AnimatedWebs registry items install the same way in any of these setups.

UI LibraryNext.js templates

Can I use AnimatedWebs components without the shadcn CLI?

Yes. AnimatedWebs Pro members can download a component's source from its page in the UI Library, fetch it through the AnimatedWebs MCP server, or pull it from the Pro API. Source arrives as clean files marked for your account. Some components are plain HTML, CSS and JavaScript, and others are React with TypeScript, so check the component page for its runtime before you place it in your project.

UI LibraryMCP serverWhat is included

Can my AI assistant install AnimatedWebs components through MCP?

Yes. The AnimatedWebs MCP server has get_component, which returns source with include_source on Pro, plus generate_component and refine_component for new AI components. Every component page in the UI Library has a Copy prompt button with text you paste into Claude, Cursor or another connected MCP client. Free accounts can connect, and the client signs in through the browser on first use.

MCP serverClaude Code setupCursor setup

Where do AnimatedWebs components install in my project?

AnimatedWebs components install under components/animatedwebs/ followed by the component name, and shared helpers go to components/animatedwebs/shared/. You then import the component's export from that folder, and each registry item's docs field names the export to use. Keeping them in their own folder separates them from your shadcn primitives in components/ui and makes updates easy to review.

UI Library

Does the shadcn CLI install npm dependencies for registry components?

Yes. A registry item can list dependencies, devDependencies and registryDependencies, and the shadcn CLI installs all of them with your package manager when you add the item. registryDependencies pull in other registry items, such as a button the component uses. AnimatedWebs registry items list the npm packages each component imports, for example three or gsap, while react, react-dom and next are left to your project.

UI Library

What is the difference between registry:ui and registry:block?

registry:ui marks a single reusable UI primitive, and registry:block marks a larger piece made of several files, such as a full section or a component with helpers. Other item types include registry:lib for utilities, registry:hook, registry:page, registry:file and registry:theme. The AnimatedWebs registry marks single-file components as registry:ui, multi-file ones as registry:block, and shared helpers as registry:lib.

UI Library

How do I build my own shadcn registry?

Create a registry.json file that lists your items, keep each item's source in your repo, and run npx shadcn@latest build. The build writes one JSON file per item, usually into public/r, which any static host can serve. Users then install with npx shadcn@latest add pointing at your item URL, or through a namespace in their components.json. Add a headers requirement on your server if items should be private.

UI Library

Can I browse the AnimatedWebs registry index before installing anything?

Yes. The AnimatedWebs registry index at animatedwebs.com/r/index.json is public and contains no source. Each entry has the component name, title, description, category, tags, preview link, thumbnail, access level and install command, which is enough for a picker or an AI agent to choose an item. The index also repeats the components.json setup for authenticated installs. The UI Library at /ui shows the same components with live previews.

UI Library

What license do AnimatedWebs UI components have?

AnimatedWebs UI components are licensed to AnimatedWebs Pro members, not open source. You may use them in any number of websites for yourself or for clients, change them freely, and keep those sites online after your plan ends. You may not resell, redistribute or share the components, include them in a competing library, or use them to train AI models. The full wording is in section 4 of the Terms.

TermsWhat is included

Is shadcn/ui free for commercial use?

Yes, shadcn/ui is released under the MIT license, so you can use it in commercial projects and change the code. Components from third-party registries carry their own licenses, which you should check per registry. AnimatedWebs components, for example, are licensed to AnimatedWebs Pro members for client and personal sites, but not for resale or redistribution.

TermsPricing and licensing answers

Does the AnimatedWebs UI Library include animated backgrounds?

Yes. Backgrounds are a category in the AnimatedWebs UI Library, alongside heroes, three.js scenes, text effects and buttons, and each one has a live preview and a shadcn install command. Separately, the AnimatedWebs template catalog has 171 animated backgrounds that are delivered as build prompts with a design system rather than as component source.

UI LibraryAnimated backgrounds

How do I add a three.js component to a React project?

Install three, or three with @react-three/fiber, and render the scene inside a client component that sizes its canvas to its container. In Next.js, load the component with a dynamic import and ssr set to false so it never runs on the server. Dispose geometries, materials and textures on unmount, and cap the pixel ratio for phones. AnimatedWebs Three.js components list three as a dependency so shadcn installs it.

three.js guidethree.js templates

Do animated components work with React Server Components?

Animated components need browser APIs, so they must be client components. Put the use client directive at the top of the file that uses hooks, Motion, GSAP or WebGL. A server component can still render that client component as a child and pass it props. Keep the client boundary small, wrapping only the animated part, so most of the page stays server rendered.

Next.js templatesUI Library

How do variants work in the AnimatedWebs UI Library?

Many AnimatedWebs components come with several variants, which are different looks or settings of the same component. On a component page you switch variants inside the live preview, and each variant has its own preview link. The UI Library homepage shows how many variants exist in total. Variant names are also searchable, so a search can land you on the exact version you want.

UI Library

What is the difference between a UI Library component and an AnimatedWebs template?

A UI Library component comes with real source code on Pro, installable with shadcn, while a template delivers a build prompt and design system. AnimatedWebs templates, 1,777 items including 1,042 full websites, give you a live demo where one exists, the prompt your AI tool builds from, and DESIGN.md, Tailwind tokens and CSS variables. There is no source ZIP of a template demo.

What is includedTemplatesUI Library

How much does AnimatedWebs component source code cost?

Component source is included in AnimatedWebs Pro, with no per-component price. Pro costs $19 a month, or $149 billed once a year, which is about $12.42 a month. Lifetime costs $199 once for the first 100 members, then $299. There is no free trial of Pro, but every live preview is free to open first.

PricingRefunds

Can I use AnimatedWebs components in client projects?

Yes. The AnimatedWebs license lets you build websites for yourself or for clients from what your plan includes, under section 4.2 of the Terms, and keep them online after your plan ends. What you may not do is resell the components on their own, share them, or bundle them into a competing component library. Each client site can use as many components as it needs.

TermsPricing and licensing answers

Why does the AnimatedWebs registry return 401 or 403?

A 401 means the request carried no valid token, and a 403 means the account is signed in but does not have AnimatedWebs Pro. For a 401, check that components.json has the @animatedwebs registry with the Authorization header and that ANIMATEDWEBS_TOKEN is set in the shell or env file the CLI reads. The 401 response includes the setup hint. For a 403, upgrade the account on the pricing page.

UI Library install stepsPricing

How do I keep a registry token out of git?

Reference the token as an environment variable in components.json and store the real value outside the repo. Put it in a local env file such as .env.local, make sure that file is listed in .gitignore, and add the token as a secret in your CI provider. components.json then only contains a placeholder like ${ANIMATEDWEBS_TOKEN}, so it is safe to commit. Rotate the token if it ever lands in a commit.

UI Library install steps

How do AI coding tools work with shadcn components?

Most AI coding tools already know shadcn/ui well. Claude Code, Cursor and Codex can run the shadcn CLI in your terminal, and v0 builds interfaces with shadcn/ui components by default. Because the code lives in your repo, the AI can read and edit every component directly. For AnimatedWebs components, connect the AnimatedWebs MCP server so the assistant can search the library and fetch source on Pro.

MCP serverTemplates for v0Templates for Claude Code

What CSS variables does shadcn/ui use?

shadcn/ui themes use paired variables such as --background and --foreground, --primary and --primary-foreground, plus --secondary, --muted, --accent, --destructive, --card, --popover, --border, --input, --ring and --radius. Chart and sidebar colors have their own sets. Every component reads these variables, so changing them in :root and .dark restyles the whole interface without touching component code.

StylesDesign answers

How do I animate a shadcn dialog or dropdown?

shadcn dialogs, dropdowns and popovers animate with utility classes keyed to the data-state attribute that Radix sets, such as data-[state=open]:animate-in and data-[state=closed]:fade-out-0. In Tailwind v4 projects those classes come from the tw-animate-css package. Change the duration, zoom or slide classes on the content element to tune the motion, and keep exit animations short so the interface feels responsive.

Motion components

How do I search the AnimatedWebs UI Library?

Use the search box on the AnimatedWebs UI Library page, which matches component titles, descriptions, categories, runtimes, tags and variant names, with every term required to match. You can also filter by category or tag and sort by most recent. If nothing matches, the page offers the AI UI generator so you can describe the component and have it built.

UI LibraryAI UI generator