Getting Started with Earthling UI
Earthling UI is a modern, opinionated component library designed to help you build beautiful, accessible, and consistent user interfaces. It's built with a focus on developer experience and flexibility, allowing you to either import components directly or eject them into your project.
Installation
Install Earthling UI in your project:
bun add earthling-ui
Quick Start
Option 1: Create a new project
The easiest way to get started is to create a new project using the Earthling UI CLI:
bunx earthling-ui create next my-app
This will create a new Next.js project with Earthling UI pre-configured. You can also use other templates like spa (Vite), tauri (desktop app), or monorepo.
Option 2: Add to an existing project
- Install the package as shown above
- Import the CSS in your main CSS file:
@import "earthling-ui";
- Import components directly:
import { Button } from "earthling-ui/button";
export default function MyComponent() {
return <Button>Click me</Button>;
}
Using Themes
Earthling UI comes with a default theme, but you can also import additional themes:
@import "earthling-ui/theme/dark";
You can apply themes using CSS classes:
<div className="theme-dark">
{/* Components in here will use the dark theme */}
</div>
What's Next?
- Explore the CLI documentation to learn about project creation and component management
- Check out the theming guide to customize the look and feel of your components
- Browse the available templates for different project types
- View the component documentation to see all available components