Getting Started
Get up and running with Sugarcoat UI in minutes.
Prerequisites
Make sure you have Node.js 18+ and a React 18+ project set up before proceeding.
Installation#
Install the packages using your preferred package manager:
npmpnpmyarnbun
Project Structure#
After installation, your project should look like this:
src
app
layout.tsx
page.tsx
globals.css
components
package.json
tsconfig.json
Setup#
1
Import the CSS#
Add the runtime styles to your app's entry point:
2
Use Components#
Import and use components directly:
3
Customize as needed#
Use the css() function for custom styling:
Component Preview#
Here's a quick preview of what you can build:
Tip
Use the asChild prop to render buttons as links while keeping the button styling.
Configuration Options#
| Option | Type | Default | Description |
|---|---|---|---|
prefix | string | "sui" | CSS class prefix |
theme | object | {} | Theme customization |
darkMode | boolean | true | Enable dark mode support |
Breaking Changes
If you're upgrading from v0.x, please check the migration guide for breaking changes.
Next Steps#
- Explore Component Documentation
- Learn about Theming
- Check out Typography