Skip to content

Commit 2745a90

Browse files
authored
Merge pull request #512 from dev-five-git/update-docs
Update docs
2 parents 2047e6a + 2c25970 commit 2745a90

File tree

14 files changed

+2156
-252
lines changed

14 files changed

+2156
-252
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ tarpaulin-report.html
1616
tarpaulin-report.json
1717
*storybook.log
1818
storybook-static
19+
.claude

README.md

Lines changed: 125 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
</div>
44

55
<h3 align="center">
6-
Zero Config, Zero FOUC, Zero Runtime, CSS in JS Preprocessor
6+
The Future of CSS-in-JS — Zero Runtime, Full Power
77
</h3>
88

9+
<p align="center">
10+
<strong>Zero Config · Zero FOUC · Zero Runtime · Complete CSS-in-JS Syntax Coverage</strong>
11+
</p>
12+
913
---
1014

1115
<div>
@@ -31,6 +35,18 @@
3135

3236
English | [한국어](README_ko.md)
3337

38+
## Why Devup UI?
39+
40+
**Devup UI isn't just another CSS-in-JS library — it's the next evolution.**
41+
42+
Traditional CSS-in-JS solutions force you to choose between developer experience and performance. Devup UI eliminates this trade-off entirely by processing all styles at build time using a Rust-powered preprocessor.
43+
44+
- **Complete Syntax Coverage**: Every CSS-in-JS pattern you know — variables, conditionals, responsive arrays, pseudo-selectors — all fully supported
45+
- **Familiar API**: `styled()` API compatible with styled-components and Emotion patterns
46+
- **True Zero Runtime**: No JavaScript execution for styling at runtime. Period.
47+
- **Smallest Bundle Size**: Optimized class names (`a`, `b`, ... `aa`, `ab`) minimize CSS output
48+
- **Fastest Build Times**: Rust + WebAssembly delivers unmatched preprocessing speed
49+
3450
## Install
3551

3652
```sh
@@ -51,87 +67,84 @@ npm install @devup-ui/webpack-plugin
5167

5268
## Features
5369

54-
- Preprocessor
55-
- Zero Config
56-
- Zero FOUC
57-
- Zero Runtime
58-
- RSC Support
59-
- Must not use JavaScript, client-side logic, or hybrid solutions
60-
- Support Library mode
61-
- Zero Cost Dynamic Theme Support based on CSS Variables
62-
- Theme with Typing
63-
- Smallest size, fastest speed
64-
65-
## Inspirations
66-
67-
- Styled System
68-
- Chakra UI
69-
- Theme UI
70-
- Vanilla Extract
71-
- Rainbow Sprinkles
72-
- Kuma UI
70+
- **Preprocessor** — All CSS extraction happens at build time
71+
- **Zero Config** — Works out of the box with sensible defaults
72+
- **Zero FOUC** — No flash of unstyled content, no Provider required
73+
- **Zero Runtime** — No client-side JavaScript for styling
74+
- **RSC Support** — Full React Server Components compatibility
75+
- **Library Mode** — Build component libraries with extracted styles
76+
- **Dynamic Themes** — Zero-cost theme switching via CSS variables
77+
- **Type-Safe Themes** — Full TypeScript support for theme tokens
78+
- **Smallest & Fastest** — Proven by benchmarks
7379

7480
## Comparison Benchmarks
7581

7682
Next.js Build Time and Build Size (github action - ubuntu-latest)
7783

78-
| Library | Version | Build Time | Build Size |
79-
| ------------------------------ | ------- | ---------- | ----------------- |
80-
| tailwindcss | 4.1.13 | 19.31s | 59,521,539 bytes |
81-
| styleX | 0.15.4 | 41.78s | 86,869,452 bytes |
82-
| vanilla-extract | 1.17.4 | 19.50s | 61,494,033 bytes |
83-
| kuma-ui | 1.5.9 | 20.93s | 69,924,179 bytes |
84-
| panda-css | 1.3.1 | 20.64s | 64,573,260 bytes |
85-
| chakra-ui | 3.27.0 | 28.81s | 222,435,802 bytes |
86-
| mui | 7.3.2 | 20.86s | 97,964,458 bytes |
87-
| devup-ui(per-file css) | 1.0.18 | 16.90s | 59,540,459 bytes |
88-
| devup-ui(single css) | 1.0.18 | 17.05s | 59,520,196 bytes |
89-
| tailwindcss(turbopack) | 4.1.13 | 6.72s | 5,355,082 bytes |
90-
| devup-ui(single css+turbopack) | 1.0.18 | 10.34s | 4,772,050 bytes |
84+
| Library | Version | Build Time | Build Size |
85+
| ---------------------------------- | ------- | ---------- | -------------------- |
86+
| tailwindcss | 4.1.13 | 19.31s | 59,521,539 bytes |
87+
| styleX | 0.15.4 | 41.78s | 86,869,452 bytes |
88+
| vanilla-extract | 1.17.4 | 19.50s | 61,494,033 bytes |
89+
| kuma-ui | 1.5.9 | 20.93s | 69,924,179 bytes |
90+
| panda-css | 1.3.1 | 20.64s | 64,573,260 bytes |
91+
| chakra-ui | 3.27.0 | 28.81s | 222,435,802 bytes |
92+
| mui | 7.3.2 | 20.86s | 97,964,458 bytes |
93+
| **devup-ui(per-file css)** | 1.0.18 | **16.90s** | 59,540,459 bytes |
94+
| **devup-ui(single css)** | 1.0.18 | **17.05s** | **59,520,196 bytes** |
95+
| tailwindcss(turbopack) | 4.1.13 | 6.72s | 5,355,082 bytes |
96+
| **devup-ui(single css+turbopack)** | 1.0.18 | 10.34s | **4,772,050 bytes** |
9197

9298
## How it works
9399

94-
Devup UI is a CSS in JS preprocessor that does not require runtime.
95-
Devup UI eliminates the performance degradation of the browser through the CSS in JS preprocessor.
96-
We develop a preprocessor that considers all grammatical cases.
100+
Devup UI transforms your components at build time. Class names are generated using a compact base-37 encoding for minimal CSS size.
101+
102+
**Basic transformation:**
97103

98104
```tsx
99-
const before = <Box bg="red" />
105+
// You write:
106+
const variable = <Box _hover={{ bg: 'blue' }} bg="red" p={4} />
107+
108+
// Devup UI generates:
109+
const variable = <div className="a b c" />
100110

101-
const after = <div className="d0" />
111+
// With CSS:
112+
// .a { background-color: red; }
113+
// .b { padding: 1rem; }
114+
// .c:hover { background-color: blue; }
102115
```
103116

104-
Variables are fully supported.
117+
**Dynamic values become CSS variables:**
105118

106119
```tsx
107-
const before = <Box bg={colorVariable} />
120+
// You write:
121+
const example = <Box bg={colorVariable} />
108122

109-
const after = (
110-
<div
111-
className="d0"
112-
style={{
113-
'--d0': colorVariable,
114-
}}
115-
/>
116-
)
123+
// Devup UI generates:
124+
const example = <div className="a" style={{ '--a': colorVariable }} />
125+
126+
// With CSS:
127+
// .a { background-color: var(--a); }
117128
```
118129

119-
Various expressions and responsiveness are also fully supported.
130+
**Complex expressions and responsive arrays — fully supported:**
120131

121132
```tsx
122-
const before = <Box bg={['red', 'blue', a > b ? 'yellow' : variable]} />
133+
// You write:
134+
const example = <Box bg={['red', 'blue', isActive ? 'green' : dynamicColor]} />
123135

124-
const after = (
136+
// Devup UI generates:
137+
const example = (
125138
<div
126-
className={`d0 d1 ${a > b ? 'd2' : 'd3'}`}
127-
style={{
128-
'--d2': variable,
129-
}}
139+
className={`a b ${isActive ? 'c' : 'd'}`}
140+
style={{ '--d': dynamicColor }}
130141
/>
131142
)
143+
144+
// With responsive CSS for each breakpoint
132145
```
133146

134-
Support Theme with Typing
147+
**Type-safe theming:**
135148

136149
`devup.json`
137150

@@ -140,33 +153,79 @@ Support Theme with Typing
140153
"theme": {
141154
"colors": {
142155
"default": {
156+
"primary": "#0070f3",
143157
"text": "#000"
144158
},
145159
"dark": {
146-
"text": "white"
160+
"primary": "#3291ff",
161+
"text": "#fff"
162+
}
163+
},
164+
"typography": {
165+
"heading": {
166+
"fontFamily": "Pretendard",
167+
"fontSize": "24px",
168+
"fontWeight": 700,
169+
"lineHeight": 1.3
147170
}
148171
}
149172
}
150173
}
151174
```
152175

153176
```tsx
154-
// Type Safe
155-
<Text color="$text" />
177+
// Type-safe theme tokens
178+
const textExample = <Text color="$primary" />
179+
const boxExample = <Box typography="$heading" />
156180
```
157181

158-
Support Responsive And Pseudo Selector
159-
160-
You can use responsive and pseudo selector.
182+
**Responsive + Pseudo selectors together:**
161183

162184
```tsx
163-
// Responsive with Selector
164-
const box = <Box _hover={{ bg: ['red', 'blue'] }} />
185+
// Responsive with pseudo selector
186+
const example = <Box _hover={{ bg: ['red', 'blue'] }} />
165187

166-
// Same
167-
const box = <Box _hover={[{ bg: 'red' }, { bg: 'blue' }]} />
188+
// Equivalent syntax
189+
const example2 = <Box _hover={[{ bg: 'red' }, { bg: 'blue' }]} />
190+
```
191+
192+
**styled-components / Emotion compatible `styled()` API:**
193+
194+
```tsx
195+
import { styled } from '@devup-ui/react'
196+
197+
// Familiar syntax for styled-components and Emotion users
198+
const Card = styled('div', {
199+
bg: 'white',
200+
p: 4, // 4 * 4 = 16px
201+
borderRadius: '8px',
202+
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
203+
_hover: {
204+
boxShadow: '0 10px 15px rgba(0, 0, 0, 0.1)',
205+
},
206+
})
207+
208+
const Button = styled('button', {
209+
px: 4, // 4 * 4 = 16px
210+
py: 2, // 2 * 4 = 8px
211+
borderRadius: '4px',
212+
cursor: 'pointer',
213+
})
214+
215+
// Usage
216+
const cardExample = <Card>Content</Card>
217+
const buttonExample = <Button>Click me</Button>
168218
```
169219

220+
## Inspirations
221+
222+
- Styled System
223+
- Chakra UI
224+
- Theme UI
225+
- Vanilla Extract
226+
- Rainbow Sprinkles
227+
- Kuma UI
228+
170229
## How to Contribute
171230

172231
### Requirements

0 commit comments

Comments
 (0)