Installation
Installing and configuring Star Forge components
Set Up Next.js
System Requirements
- Node.js 22 or later.
Automatic Installation
We recommend starting a new Next.js project using create-next-app, which sets everything up automatically. To create a project, run:
npx create-next-app@latestDuring installation, you will see the following prompts:
What is your project named? my-app
Would you like to use TypeScript? No / Yes
Would you like to use ESLint? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to use Turbopack for `next dev`? No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
What import alias would you like configured? @/*After answering the prompts, create-next-app will create a folder with your project name and install the required dependencies.
Install Star Forge
For Next.js Projects
Initialize the Project
Run the init command to set up Star Forge in a new or existing Next.js project:
npx shadcn@latest initYou can use the -d flag to apply default settings, such as the new-york style, the zinc base color, and CSS variables support.
npx shadcn@latest init -dConfigure components.json
You will be guided through a few questions to configure the components.json file:
Which style would you like to use? › New York
Which color would you like to use as base color? › Zinc
Do you want to use CSS variables for colors? › no / yesThis file will be created in the root directory of your project and will define the style and theme preferences for Star Forge components.
Add Components
Once configuration is complete, you can start adding components to your project:
npx shadcn@latest add https://starforge-docs.com/r/typography-1.jsonThe command above will add the Typography1 component to the components/ui directory. You can import it like this:
import Typography1 from '@/components/ui/typography-1';
export default function Home() {
return (
<>
<Typography1.H1> Hello World </Typography1.H1>
</>
);
}Customize the Theme
Adjust the CSS variables in the src/app/globals.css file to align components with your design system:
:root {
--background: 0 0% 100%;
--primary: 222.2 47.4% 11.2%;
--radius: 0.5rem;
}Ready to Use
You are now ready to forge amazing interfaces with Star Forge! Explore the components documentation to add more elements and customize them as needed.
Additional Dependencies
Star Forge relies on the following libraries, which are installed automatically by the npx shadcn@latest init command:
- Tailwind CSS: For fast and flexible component styling.
- Radix UI or Base UI: To ensure accessibility and robust component behavior. Star Forge supports both — choose the engine that fits your project.
- Class Variance Authority (CVA): To efficiently manage style variants.
If you started the project with create-next-app and selected Tailwind CSS, it will already be configured. Otherwise, follow the Tailwind CSS installation instructions to set it up manually.
For feedback or contributions, visit our GitHub repository.
Contribute to Star Forge
v2.2.14