Skip to content

Commit 73dffe5

Browse files
committed
docs: add devup.json for customization documentation
1 parent f629b89 commit 73dffe5

File tree

1 file changed

+151
-0
lines changed
  • apps/landing/src/app/(detail)/docs/figma-and-theme-integration/devup-json

1 file changed

+151
-0
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
export const metadata = {
2+
title: 'devup.json Configuration',
3+
alternates: {
4+
canonical: '/docs/figma-and-theme-integration/devup-json',
5+
},
6+
}
7+
8+
# devup.json Configuration
9+
10+
The `devup.json` file is the central configuration file for Devup UI that allows you to define custom themes, colors, typography, and other design tokens.
11+
12+
## Basic Structure
13+
14+
```json
15+
{
16+
"theme": {
17+
"colors": {
18+
"primary": "#5A44FF"
19+
},
20+
"typography": {
21+
"h1": {
22+
"fontSize": "32px"
23+
}
24+
}
25+
}
26+
}
27+
```
28+
29+
## Colors Configuration
30+
31+
### **Basic Color Setup**
32+
33+
Define colors for different themes.
34+
35+
```json
36+
{
37+
"theme": {
38+
"colors": {
39+
"light": {
40+
"primary": "#5A44FF",
41+
"secondary": "#85A5F2",
42+
"text": "#2F2F2F",
43+
"background": "#FFF"
44+
},
45+
"dark": {
46+
"primary": "#9086FF",
47+
"secondary": "#2A4586",
48+
"text": "#EDEDED",
49+
"background": "#131313"
50+
}
51+
}
52+
}
53+
}
54+
```
55+
56+
### **Semantic Color Naming**
57+
58+
Use semantic names that describe purpose.
59+
60+
```json
61+
{
62+
"theme": {
63+
"colors": {
64+
"light": {
65+
"primary": "#5A44FF",
66+
"primaryHover": "#4D38AE",
67+
"text": "#2F2F2F",
68+
"textSecondary": "#787878",
69+
"background": "#FFF",
70+
"surface": "#F8F8F8",
71+
"success": "#4CAF50",
72+
"warning": "#FF9800",
73+
"error": "#F44336"
74+
}
75+
}
76+
}
77+
}
78+
```
79+
80+
### **Color Variants**
81+
82+
Create color variants with opacity.
83+
84+
```json
85+
{
86+
"theme": {
87+
"colors": {
88+
"light": {
89+
"primary": "#5A44FF",
90+
"primary50": "#5A44FF80",
91+
"primary20": "#5A44FF33",
92+
"black50": "#00000080"
93+
}
94+
}
95+
}
96+
}
97+
```
98+
99+
## Typography Configuration
100+
101+
### **Typography Properties**
102+
103+
Each typography definition can include.
104+
105+
- **fontFamily**: Font family name
106+
- **fontWeight**: Numeric weight (100-900) or string
107+
- **fontSize**: Size with unit (`16px`, `1rem`)
108+
- **lineHeight**: Numeric ratio or string with unit
109+
- **letterSpacing**: Spacing with unit (`-0.03em`)
110+
111+
### **Static Typography**
112+
113+
For non-responsive typography, use objects.
114+
115+
```json
116+
{
117+
"theme": {
118+
"typography": {
119+
"caption": {
120+
"fontFamily": "Pretendard",
121+
"fontWeight": 500,
122+
"fontSize": "14px",
123+
"lineHeight": 1.4
124+
}
125+
}
126+
}
127+
}
128+
```
129+
130+
## Usage in Components
131+
132+
### **Color Usage**
133+
134+
Access colors using the `$` prefix.
135+
136+
```tsx
137+
<Box bg="$primary" borderColor="$border" color="$text">
138+
Content
139+
</Box>
140+
```
141+
142+
### **Typography Usage**
143+
144+
Apply typography styles using the `typography` prop.
145+
146+
```tsx
147+
<>
148+
<Text typography="h1">Heading 1</Text>
149+
<Text typography="body">Body text</Text>
150+
</>
151+
```

0 commit comments

Comments
 (0)