The UI parts.
Each directory in this repo (except docs) represents a Part - a basic React component. For example:
Metrics- Displays metrics like numbers or short stringsLayout- Layout components for structuring your UI
First, check if you have Git installed by opening your terminal and running:
git --versionIf you see a version number, you're all set! If not, download and install Git from git-scm.com.
Open your terminal and navigate to where you want to save this project, then run:
git clone https://github.com/lokico/Parts.gitThis will download all the files to a folder called Parts. Navigate into it:
cd PartsClaude Code is an AI assistant that can help you create new Parts quickly and easily.
-
Make sure you have Node.js installed (see "Live Preview" section below if you don't)
-
Install Claude Code globally:
curl -fsSL https://claude.ai/install.sh | bash- Run Claude Code for the first time:
claudeIt will guide you through the setup process and ask you to authenticate with your Anthropic account.
Once you're in the Parts directory, start Claude Code:
claudeThen you can ask it to create new Parts for you. For example:
Create a new Part called "Button" that's a customizable button component with different sizes and colors
Claude Code will:
- Create the directory structure
- Write the React component code
- Add a README with a description
- Follow the existing patterns in the repo
You can also ask it to:
- Modify existing Parts
- Add new features to components
- Fix bugs or issues
- Explain how any Part works
You can preview your Parts in a live development environment using Blockparty.
Before you can use Blockparty, you need Node.js installed on your computer.
- Check if you already have Node.js:
node --version- If you see a version number (like
v20.0.0), you're good to go! If not, download and install Node.js from nodejs.org. We recommend the LTS (Long Term Support) version.
Once Node.js is installed, you can start the live preview server:
npx blockpartyThe first time you run this, it will download Blockparty automatically. After that, it will start a development server and open your browser to show your Parts in action.
As you make changes to your Parts, the preview will automatically update - no need to refresh!
Parts/
├── README.md # This file
├── docs/ # GitHub Pages documentation
├── Metrics/ # A Part for displaying metrics
│ ├── README.md # Part description
│ └── index.tsx # Component code
├── Layout/ # A Part for layouts
│ └── ...
└── [Your Parts]/ # Add your own Parts here
- Each Part is self-contained: Everything related to a Part lives in its own directory
- Use Claude Code liberally: Don't be afraid to ask it questions or request changes
- Preview often: Run
npx blockpartyto see your changes live - Check the README: Each Part has its own README explaining what it does
- Ask Claude Code questions while working in the repo
- Check individual Part READMEs for component-specific documentation
- Look at existing Parts to understand the patterns
Happy building!