Build a pro, animated website with Claude Code or Codex: the 3-step setup
Claude Code, or Codex from ChatGPT, can build a complete website on your computer. Three building blocks make the difference: an animation library, a design skill and a component bank. Here is how to install each one, then the prompt to launch the website.
Step by step
-
Step 1
What you need
- For Claude Code: a Claude Pro, Max, Team or Enterprise plan. The free plan does not give access to Claude Code.
- Or for Codex: a ChatGPT Plus, Pro, Business, Edu or Enterprise account.
- Node.js, free on nodejs.org: it provides the npm and npx commands used in the next steps.
- Python 3, free on python.org: the design skill uses it for its searches.
- A free account on 21st.dev.
-
Step 2
Install Claude Code or Codex
Create an empty folder for your website. Open a terminal (Terminal on Mac, PowerShell on Windows) and paste the command for your system.
Claude Code:
- Mac and Linux: curl -fsSL https://claude.ai/install.sh | bash
- Windows (PowerShell): irm https://claude.ai/install.ps1 | iex
Codex:
- Mac and Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh
- Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
Then open a new terminal, go to the website folder (cd, then the folder path) and type claude or codex. The first time, sign in with your Claude account, or choose Sign in with ChatGPT for Codex.
-
Step 3
The animations: Motion
Framer Motion is now called Motion. It is a free, open source animation library: elements appearing on scroll, hover effects, transitions between sections. It is what makes the website feel alive.
With Claude Code, install its kit for AI (AI Kit), which gives Claude the up-to-date documentation and best practices for Motion. In a terminal opened in the website folder:
- Type npx motion-ai.
- Choose project (this website only) or global (all your projects), then tick Claude Code.
The installer adds the /motion skill and a free MCP server. If Claude does not see it, turn this server on with the /mcp command in Claude Code.
With Codex, simply ask for Motion in the prompt of step 6: Codex installs the library in the project (npm install motion).
-
Step 4
The design skill: UI UX Pro Max
A skill is a folder of instructions that the agent reads when it needs them. UI UX Pro Max gives it the instincts of a designer: 79 interface styles, 192 color palettes, 74 Google Fonts pairings and 119 usability rules. It is free (MIT license).
In Claude Code, type these two commands one after the other:
- /plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill
- /plugin install ui-ux-pro-max@ui-ux-pro-max-skill
With Codex, in a terminal opened in the website folder:
- npm install -g ui-ux-pro-max-cli
- uipro init --ai codex
No need to call it afterwards: the skill turns on by itself as soon as you ask for an interface.
-
Step 5
The components: 21st.dev
21st.dev is a bank of ready-to-use components: headers, hero sections, pricing grids, forms. Its MCP server lets the agent search it for a component and take the code itself.
In a terminal opened in the website folder:
- npm i -g @21st-dev/cli
- 21st login, to link your 21st.dev account.
- For Claude Code: 21st init --client claude --write. The command writes the configuration to the .mcp.json file in the folder.
- For Codex: 21st init --client codex. The command displays a configuration block: paste it into the file ~/.codex/config.toml (the .codex folder in your home folder).
Then restart Claude Code or Codex so it loads the new server, and accept it if it asks you to.
The free plan gives two fetches per day. Beyond that, you need the Builder plan, from 6 dollars a month billed annually.
-
Step 6
The prompt to build the website
Launch claude or codex in the website folder and paste this prompt, replacing the parts in square brackets:
Prompt to copyBuild the website for [my business] for [my typical client]. Pages: [home, services, pricing, contact]. Mood: [clean and premium, preferred colors]. Use the UI UX Pro Max skill to choose the style, colors and fonts before writing the code. Take the components of the main sections from 21st.dev when there is one that fits. Animate the website with Motion: elements appearing on scroll, button hover effects, smooth transitions, without overdoing it. The website must be perfect on mobile. Do not invent customer reviews, figures or references: write [to be completed] instead. When it is ready, run the website on my computer and give me the address to view it in the browser.
The agent asks for your approval before running commands: read them before accepting.
-
Step 7
Refine it, then put it online
Fix one section at a time, in the same session:
Prompt to copyThe [name] section is too busy: simplify it and keep only one animation.
To publish the website, ask for the steps for your hosting provider:
Prompt to copyExplain to me how to put this website online with [hosting provider], step by step, and do yourself whatever can be done from this folder.
The tools
Good to know
- The free 21st.dev plan gives two fetches per day, shared between components, icons, themes and prompts.
- Motion's kit is free for the documentation and best practices; the premium examples and some tools require Motion+, which is paid.
- The agent runs commands on your computer: work in a folder dedicated to the website and read each request before accepting.
- Proofread every text on the website: the AI must not invent customer reviews, figures or references.
Sources: code.claude.com, github.com, motion.dev, motion.dev, motion.dev, motion.dev, github.com, help.21st.dev, help.21st.dev, help.21st.dev