You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/ui/content/docs/(root)/get-started.mdx
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,23 +17,37 @@ You can add components **automatically with the shadcn CLI** or **manually by co
17
17
18
18
Each component page provides a command to add it to your project automatically. The CLI will create the necessary files and install any dependencies for you.
19
19
20
-
### Install all UI Components
20
+
### New Project Setup (Recommended)
21
21
22
-
You can install all **coss ui** primitives at once with a single command:
22
+
For new projects, use the **coss style** preset to initialize everything in one command:
23
+
24
+
```bash
25
+
npx shadcn@latest init coss/style
26
+
```
27
+
28
+
This installs all UI components, the neutral color system, sidebar variables, font variables, and base styles. Components like Dialog and AlertDialog use `font-heading` for titles—the style preset provides sensible fallbacks, and you can customize fonts via `next/font` in your layout.
29
+
30
+
### Existing Projects
31
+
32
+
To add components to an existing project:
23
33
24
34
```bash
25
35
npx shadcn@latest add @coss/ui
26
36
```
27
37
28
-
This will add all UI components to your project in one go, including button, card, avatar, dialog, tabs, and more.
38
+
This adds all UI primitives (button, card, avatar, dialog, tabs, and more). For the full theme including colors, sidebar, and fonts:
39
+
40
+
```bash
41
+
npx shadcn@latest add @coss/style
42
+
```
29
43
30
-
**Recommended**: Install with our optimized color tokens for the best visual results:
This command installs both the UI components and our default neutral-based color system, which provides crisp, contrasted borders and enhanced visual depth. See the [Styling](/ui/docs/styling) guide for more details about our color system.
50
+
See the [Styling](/ui/docs/styling) guide for more details.
Copy file name to clipboardExpand all lines: apps/ui/content/docs/(root)/styling.mdx
+24-40Lines changed: 24 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,33 +13,13 @@ While this color system is optional, it's designed to provide optimal visual res
13
13
14
14
## Installation
15
15
16
-
<CodeTabs>
17
-
18
-
<TabsList>
19
-
<TabsTabvalue="cli">CLI</TabsTab>
20
-
<TabsTabvalue="manual">Manual</TabsTab>
21
-
</TabsList>
22
-
23
-
<TabsPanelvalue="cli">
24
-
25
-
```bash
26
-
npx shadcn@latest add @coss/colors-neutral
27
-
```
28
-
29
-
This command will override your existing color variables. We're currently providing a default configuration based on neutral colors, but we plan to add more color variants in the future to give you more styling options while maintaining the same optimization principles.
30
-
31
-
</TabsPanel>
32
-
33
-
<TabsPanelvalue="manual">
34
-
35
-
<Steps>
36
-
37
-
<Step>
38
-
Copy and paste the following CSS variables into your `globals.css` file:
39
-
</Step>
16
+
See [Get Started](/ui/docs/get-started) for installing with the CLI. If you prefer to add the theme manually, paste the following into your `globals.css`:
40
17
41
18
```css title="app/globals.css"
42
19
@theme inline {
20
+
--font-sans: var(--font-sans);
21
+
--font-heading: var(--font-heading);
22
+
--font-mono: var(--font-mono);
43
23
--color-background: var(--background);
44
24
--color-foreground: var(--foreground);
45
25
--color-sidebar-ring: var(--sidebar-ring);
@@ -183,25 +163,29 @@ This command will override your existing color variables. We're currently provid
183
163
}
184
164
```
185
165
186
-
</Steps>
187
-
188
-
</TabsPanel>
189
-
190
-
</CodeTabs>
191
-
192
-
## Extended Color Variables
166
+
## Font Variables
193
167
194
-
We've introduced additional color variables beyond the standard shadcn/ui palette to provide more control for specific components like badges and alerts:
168
+
Components like Dialog, AlertDialog, Sheet, and Empty use the `font-heading` class for titles. The coss style preset defines `--font-sans`, `--font-heading`, and `--font-mono` with system font fallbacks. To use custom fonts, define these variables in your layout using `next/font`:
195
169
196
-
-`--destructive-foreground`: Foreground color for destructive actions
197
-
-`--info`: Information state color
198
-
-`--info-foreground`: Foreground color for information states
199
-
-`--success`: Success state color
200
-
-`--success-foreground`: Foreground color for success states
201
-
-`--warning`: Warning state color
202
-
-`--warning-foreground`: Foreground color for warning states
0 commit comments