@maccesar/titools 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS-TEMPLATE.md +173 -0
- package/README.md +867 -0
- package/agents/ti-researcher.md +108 -0
- package/bin/titools.js +53 -0
- package/lib/commands/agents.js +126 -0
- package/lib/commands/install.js +188 -0
- package/lib/commands/uninstall.js +215 -0
- package/lib/commands/update.js +159 -0
- package/lib/config.js +119 -0
- package/lib/downloader.js +153 -0
- package/lib/installer.js +253 -0
- package/lib/platform.js +108 -0
- package/lib/symlink.js +142 -0
- package/lib/utils.js +270 -0
- package/package.json +67 -0
- package/skills/alloy-expert/SKILL.md +247 -0
- package/skills/alloy-expert/assets/ControllerAutoCleanup.js +182 -0
- package/skills/alloy-expert/references/alloy-structure.md +381 -0
- package/skills/alloy-expert/references/anti-patterns.md +133 -0
- package/skills/alloy-expert/references/code-conventions.md +469 -0
- package/skills/alloy-expert/references/contracts.md +280 -0
- package/skills/alloy-expert/references/controller-patterns.md +520 -0
- package/skills/alloy-expert/references/error-handling.md +484 -0
- package/skills/alloy-expert/references/examples.md +735 -0
- package/skills/alloy-expert/references/migration-patterns.md +298 -0
- package/skills/alloy-expert/references/patterns.md +448 -0
- package/skills/alloy-expert/references/performance-patterns.md +855 -0
- package/skills/alloy-expert/references/security-patterns.md +847 -0
- package/skills/alloy-expert/references/state-management.md +779 -0
- package/skills/alloy-expert/references/testing.md +872 -0
- package/skills/alloy-guides/SKILL.md +214 -0
- package/skills/alloy-guides/references/CLI_TASKS.md +243 -0
- package/skills/alloy-guides/references/CONCEPTS.md +191 -0
- package/skills/alloy-guides/references/CONTROLLERS.md +298 -0
- package/skills/alloy-guides/references/MODELS.md +1028 -0
- package/skills/alloy-guides/references/PURGETSS.md +56 -0
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +242 -0
- package/skills/alloy-guides/references/VIEWS_STYLES.md +388 -0
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +109 -0
- package/skills/alloy-guides/references/VIEWS_XML.md +558 -0
- package/skills/alloy-guides/references/WIDGETS.md +176 -0
- package/skills/alloy-howtos/SKILL.md +203 -0
- package/skills/alloy-howtos/references/best_practices.md +138 -0
- package/skills/alloy-howtos/references/cli_reference.md +253 -0
- package/skills/alloy-howtos/references/config_files.md +87 -0
- package/skills/alloy-howtos/references/custom_tags.md +147 -0
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +101 -0
- package/skills/alloy-howtos/references/samples.md +167 -0
- package/skills/purgetss/SKILL.md +442 -0
- package/skills/purgetss/assets/purgetss.config.cjs +17 -0
- package/skills/purgetss/references/EXAMPLES.md +247 -0
- package/skills/purgetss/references/animation-system.md +1294 -0
- package/skills/purgetss/references/apply-directive.md +375 -0
- package/skills/purgetss/references/arbitrary-values.md +612 -0
- package/skills/purgetss/references/class-index.md +1350 -0
- package/skills/purgetss/references/cli-commands.md +948 -0
- package/skills/purgetss/references/configurable-properties.md +654 -0
- package/skills/purgetss/references/custom-rules.md +161 -0
- package/skills/purgetss/references/customization-deep-dive.md +722 -0
- package/skills/purgetss/references/dynamic-component-creation.md +489 -0
- package/skills/purgetss/references/grid-layout.md +455 -0
- package/skills/purgetss/references/icon-fonts.md +609 -0
- package/skills/purgetss/references/installation-setup.md +366 -0
- package/skills/purgetss/references/opacity-modifier.md +291 -0
- package/skills/purgetss/references/platform-modifiers.md +479 -0
- package/skills/purgetss/references/smart-mappings.md +42 -0
- package/skills/purgetss/references/titanium-resets.md +359 -0
- package/skills/purgetss/references/ui-ux-design.md +1526 -0
- package/skills/ti-guides/SKILL.md +94 -0
- package/skills/ti-guides/references/advanced-data-and-images.md +19 -0
- package/skills/ti-guides/references/alloy-cli-advanced.md +84 -0
- package/skills/ti-guides/references/alloy-data-mastery.md +29 -0
- package/skills/ti-guides/references/alloy-widgets-and-themes.md +19 -0
- package/skills/ti-guides/references/android-manifest.md +97 -0
- package/skills/ti-guides/references/app-distribution.md +258 -0
- package/skills/ti-guides/references/application-frameworks.md +377 -0
- package/skills/ti-guides/references/cli-reference.md +402 -0
- package/skills/ti-guides/references/coding-best-practices.md +102 -0
- package/skills/ti-guides/references/commonjs-advanced.md +134 -0
- package/skills/ti-guides/references/hello-world.md +100 -0
- package/skills/ti-guides/references/hyperloop-native-access.md +62 -0
- package/skills/ti-guides/references/javascript-primer.md +411 -0
- package/skills/ti-guides/references/reserved-words.md +36 -0
- package/skills/ti-guides/references/resources.md +183 -0
- package/skills/ti-guides/references/style-and-conventions.md +48 -0
- package/skills/ti-guides/references/tiapp-config.md +609 -0
- package/skills/ti-howtos/SKILL.md +174 -0
- package/skills/ti-howtos/references/android-platform-deep-dives.md +658 -0
- package/skills/ti-howtos/references/automation-fastlane-appium.md +95 -0
- package/skills/ti-howtos/references/buffer-codec-streams.md +140 -0
- package/skills/ti-howtos/references/cross-platform-development.md +348 -0
- package/skills/ti-howtos/references/debugging-profiling.md +543 -0
- package/skills/ti-howtos/references/extending-titanium.md +723 -0
- package/skills/ti-howtos/references/google-maps-v2.md +169 -0
- package/skills/ti-howtos/references/ios-map-kit.md +143 -0
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +783 -0
- package/skills/ti-howtos/references/local-data-sources.md +301 -0
- package/skills/ti-howtos/references/location-and-maps.md +252 -0
- package/skills/ti-howtos/references/media-apis.md +210 -0
- package/skills/ti-howtos/references/notification-services.md +599 -0
- package/skills/ti-howtos/references/remote-data-sources.md +349 -0
- package/skills/ti-howtos/references/tutorials.md +502 -0
- package/skills/ti-howtos/references/using-modules.md +237 -0
- package/skills/ti-howtos/references/web-content-integration.md +307 -0
- package/skills/ti-howtos/references/webpack-build-pipeline.md +78 -0
- package/skills/ti-ui/SKILL.md +179 -0
- package/skills/ti-ui/references/accessibility-deep-dive.md +242 -0
- package/skills/ti-ui/references/animation-and-matrices.md +599 -0
- package/skills/ti-ui/references/application-structures.md +655 -0
- package/skills/ti-ui/references/custom-fonts-styling.md +579 -0
- package/skills/ti-ui/references/event-handling.md +393 -0
- package/skills/ti-ui/references/gestures.md +473 -0
- package/skills/ti-ui/references/icons-and-splash-screens.md +409 -0
- package/skills/ti-ui/references/layouts-and-positioning.md +462 -0
- package/skills/ti-ui/references/listviews-and-performance.md +619 -0
- package/skills/ti-ui/references/orientation.md +362 -0
- package/skills/ti-ui/references/platform-ui-android.md +635 -0
- package/skills/ti-ui/references/platform-ui-ios.md +469 -0
- package/skills/ti-ui/references/scrolling-views.md +252 -0
- package/skills/ti-ui/references/tableviews.md +568 -0
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
# Configurable Properties Reference
|
|
2
|
+
|
|
3
|
+
Complete list of all properties that can be customized in `config.cjs` under the `theme` section.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Configurable Properties Reference](#configurable-properties-reference)
|
|
8
|
+
- [Table of Contents](#table-of-contents)
|
|
9
|
+
- [Color Properties (50+ properties)](#color-properties-50-properties)
|
|
10
|
+
- [Background Colors](#background-colors)
|
|
11
|
+
- [Text Colors](#text-colors)
|
|
12
|
+
- [UI Element Colors](#ui-element-colors)
|
|
13
|
+
- [Border \& Separator Colors](#border--separator-colors)
|
|
14
|
+
- [Navigation \& Button Colors](#navigation--button-colors)
|
|
15
|
+
- [Indicator Colors](#indicator-colors)
|
|
16
|
+
- [Badge \& Notification Colors](#badge--notification-colors)
|
|
17
|
+
- [Miscellaneous Colors](#miscellaneous-colors)
|
|
18
|
+
- [Spacing \& Size Properties](#spacing--size-properties)
|
|
19
|
+
- [Dimensions](#dimensions)
|
|
20
|
+
- [Margin](#margin)
|
|
21
|
+
- [Padding](#padding)
|
|
22
|
+
- [Background Padding](#background-padding)
|
|
23
|
+
- [Content Size](#content-size)
|
|
24
|
+
- [Gaps](#gaps)
|
|
25
|
+
- [Border Properties](#border-properties)
|
|
26
|
+
- [Background Caps](#background-caps)
|
|
27
|
+
- [Positioning Properties](#positioning-properties)
|
|
28
|
+
- [Typography Properties](#typography-properties)
|
|
29
|
+
- [Layout Properties](#layout-properties)
|
|
30
|
+
- [Opacity \& Visibility](#opacity--visibility)
|
|
31
|
+
- [Transformation Properties](#transformation-properties)
|
|
32
|
+
- [Animation Properties](#animation-properties)
|
|
33
|
+
- [Z-Index \& Layering](#z-index--layering)
|
|
34
|
+
- [Shadow Properties](#shadow-properties)
|
|
35
|
+
- [Section Properties](#section-properties)
|
|
36
|
+
- [Separator Properties](#separator-properties)
|
|
37
|
+
- [Paging Properties](#paging-properties)
|
|
38
|
+
- [Zoom Properties](#zoom-properties)
|
|
39
|
+
- [Button Properties](#button-properties)
|
|
40
|
+
- [Left/Right Width](#leftright-width)
|
|
41
|
+
- [Cache Properties](#cache-properties)
|
|
42
|
+
- [Other Properties](#other-properties)
|
|
43
|
+
- [Quick Reference Table](#quick-reference-table)
|
|
44
|
+
- [Customizing in config.cjs](#customizing-in-configcjs)
|
|
45
|
+
- [Override Default Values](#override-default-values)
|
|
46
|
+
- [Extend Default Values](#extend-default-values)
|
|
47
|
+
- [Mix Override and Extend](#mix-override-and-extend)
|
|
48
|
+
- [Practical Examples](#practical-examples)
|
|
49
|
+
- [Complete Brand Color System](#complete-brand-color-system)
|
|
50
|
+
- [Custom Spacing Scale](#custom-spacing-scale)
|
|
51
|
+
- [Custom Font Family System](#custom-font-family-system)
|
|
52
|
+
- [Custom Border Radius Scale](#custom-border-radius-scale)
|
|
53
|
+
- [Complete Card Component via Ti Element](#complete-card-component-via-ti-element)
|
|
54
|
+
- [Button System with Variants](#button-system-with-variants)
|
|
55
|
+
- [Form Input System](#form-input-system)
|
|
56
|
+
- [Related References](#related-references)
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Color Properties (50+ properties)
|
|
61
|
+
|
|
62
|
+
All color properties inherit values from `theme.colors` and support a full color palette plus any custom colors you define.
|
|
63
|
+
|
|
64
|
+
### Background Colors
|
|
65
|
+
- `backgroundColor` - Main background color
|
|
66
|
+
- `backgroundDisabledColor` - Background when disabled
|
|
67
|
+
- `backgroundFocusedColor` - Background when focused
|
|
68
|
+
- `backgroundSelectedColor` - Background when selected
|
|
69
|
+
- `backgroundGradient` - Gradient backgrounds (uses `from-*` and `to-*` classes)
|
|
70
|
+
|
|
71
|
+
**Class examples:** `bg-white`, `bg-red-500`, `bg-brand-600`
|
|
72
|
+
|
|
73
|
+
### Text Colors
|
|
74
|
+
- `color` / `textColor` - Main text color
|
|
75
|
+
- `titleColor` / `titleTextColor` - Title text color
|
|
76
|
+
- `subtitleColor` / `subtitleTextColor` - Subtitle text color
|
|
77
|
+
- `hintTextColor` - Placeholder/hint text color
|
|
78
|
+
|
|
79
|
+
**Class examples:** `text-gray-900`, `text-white`, `text-brand-500`
|
|
80
|
+
|
|
81
|
+
### UI Element Colors
|
|
82
|
+
- `selectedColor` - Color when selected
|
|
83
|
+
- `selectedTextColor` - Text color when selected
|
|
84
|
+
- `selectedBackgroundColor` - Background when selected
|
|
85
|
+
- `selectedButtonColor` - Button color when selected
|
|
86
|
+
- `selectedSubtitleColor` - Subtitle color when selected
|
|
87
|
+
- `disabledColor` - Color for disabled state
|
|
88
|
+
- `highlightedColor` - Color when highlighted
|
|
89
|
+
|
|
90
|
+
### Border & Separator Colors
|
|
91
|
+
- `borderColor` - Border color
|
|
92
|
+
- `separatorColor` - Separator line color
|
|
93
|
+
- `barColor` - Toolbar/tab bar color
|
|
94
|
+
|
|
95
|
+
### Navigation & Button Colors
|
|
96
|
+
- `tintColor` / `tint` - Main tint color
|
|
97
|
+
- `navTintColor` - Navigation bar tint
|
|
98
|
+
- `activeTintColor` - Tint when active
|
|
99
|
+
- `onTintColor` - Tint for "on" state
|
|
100
|
+
- `thumbTintColor` - Slider thumb tint
|
|
101
|
+
- `trackTintColor` - Slider track tint
|
|
102
|
+
|
|
103
|
+
### Indicator Colors
|
|
104
|
+
- `indicatorColor` - General indicator color
|
|
105
|
+
- `pageIndicatorColor` - Page scroll indicator
|
|
106
|
+
- `currentPageIndicatorColor` - Current page indicator
|
|
107
|
+
- `pagingControlColor` - Paging control color
|
|
108
|
+
|
|
109
|
+
### Badge & Notification Colors
|
|
110
|
+
- `badgeColor` - Badge background/text color
|
|
111
|
+
|
|
112
|
+
### Miscellaneous Colors
|
|
113
|
+
- `shadowColor` / `viewShadowColor` - Drop shadow color
|
|
114
|
+
- `iconColor` - Icon color
|
|
115
|
+
- `imageTouchFeedbackColor` - Image touch feedback color
|
|
116
|
+
- `keyboardToolbarColor` - Keyboard toolbar color
|
|
117
|
+
- `pullBackgroundColor` - Pull-to-refresh background
|
|
118
|
+
- `tabsBackgroundColor` - Tab bar background
|
|
119
|
+
- `tabsBackgroundSelectedColor` - Selected tab background
|
|
120
|
+
- `touchFeedbackColor` - Touch feedback ripple color
|
|
121
|
+
- `statusBarBackgroundColor` - Status bar color
|
|
122
|
+
- `lightColor` - Light theme color
|
|
123
|
+
- `activeTitleColor` - Active title color
|
|
124
|
+
- `dateTimeColor` - Date/time picker color
|
|
125
|
+
- `resultsBackgroundColor` - Search results background
|
|
126
|
+
- `resultsSeparatorColor` - Search results separator
|
|
127
|
+
|
|
128
|
+
## Spacing & Size Properties
|
|
129
|
+
|
|
130
|
+
All spacing properties inherit from `theme.spacing` and support the default spacing scale plus custom values.
|
|
131
|
+
|
|
132
|
+
### Dimensions
|
|
133
|
+
- `width` / `w` - Element width
|
|
134
|
+
- `height` / `h` - Element height
|
|
135
|
+
|
|
136
|
+
**Class examples:** `w-64`, `h-screen`, `w-1/2`
|
|
137
|
+
|
|
138
|
+
### Margin
|
|
139
|
+
- `horizontalMargin` - Horizontal margins
|
|
140
|
+
- `verticalMargin` - Vertical margins
|
|
141
|
+
|
|
142
|
+
### Padding
|
|
143
|
+
- `padding` / `p` - All sides padding
|
|
144
|
+
- `paddingTop` / `pt` - Top padding
|
|
145
|
+
- `paddingRight` / `pr` - Right padding
|
|
146
|
+
- `paddingBottom` / `pb` - Bottom padding
|
|
147
|
+
- `paddingLeft` / `pl` - Left padding
|
|
148
|
+
|
|
149
|
+
**Class examples:** `p-4`, `px-8`, `py-2`, `pt-4`, `pr-8`, `pb-4`, `pl-8`
|
|
150
|
+
|
|
151
|
+
### Background Padding
|
|
152
|
+
- `backgroundPaddingTop` - Background top padding
|
|
153
|
+
- `backgroundPaddingBottom` - Background bottom padding
|
|
154
|
+
- `backgroundPaddingLeft` - Background left padding
|
|
155
|
+
- `backgroundPaddingRight` - Background right padding
|
|
156
|
+
|
|
157
|
+
### Content Size
|
|
158
|
+
- `contentWidth` - Content width
|
|
159
|
+
- `contentHeight` - Content height
|
|
160
|
+
|
|
161
|
+
### Gaps
|
|
162
|
+
- `gap` - Gap between grid/flex items (all sides)
|
|
163
|
+
- `gap-x` - Horizontal gap
|
|
164
|
+
- `gap-y` - Vertical gap
|
|
165
|
+
|
|
166
|
+
## Border Properties
|
|
167
|
+
|
|
168
|
+
- `borderWidth` - Border thickness
|
|
169
|
+
- `borderRadius` - Rounded corners
|
|
170
|
+
|
|
171
|
+
**Class examples:** `border-2`, `rounded-lg`, `rounded-full`
|
|
172
|
+
|
|
173
|
+
### Background Caps
|
|
174
|
+
- `backgroundTopCap` - Background top cap size
|
|
175
|
+
- `backgroundLeftCap` - Background left cap size
|
|
176
|
+
|
|
177
|
+
## Positioning Properties
|
|
178
|
+
|
|
179
|
+
- `top` - Top position
|
|
180
|
+
- `right` / `r` - Right position
|
|
181
|
+
- `bottom` - Bottom position
|
|
182
|
+
- `left` / `l` - Left position
|
|
183
|
+
- `xOffset` - X axis offset
|
|
184
|
+
- `yOffset` - Y axis offset
|
|
185
|
+
|
|
186
|
+
**Class examples:** `top-4`, `right-8`, `bottom-0`, `left-auto`, `right-0`
|
|
187
|
+
|
|
188
|
+
## Typography Properties
|
|
189
|
+
|
|
190
|
+
- `fontFamily` - Font family
|
|
191
|
+
- `fontSize` / `textSize` - Font size
|
|
192
|
+
- `font` - Font weight/style
|
|
193
|
+
- `lineHeightMultiple` - Line height multiplier
|
|
194
|
+
- `lines` - Maximum lines
|
|
195
|
+
- `maxLines` - Maximum lines (alias)
|
|
196
|
+
- `minimumFontSize` - Minimum font size for auto-shrink
|
|
197
|
+
|
|
198
|
+
**Class examples:** `font-sans`, `text-xl`, `font-bold`, `leading-relaxed`
|
|
199
|
+
|
|
200
|
+
## Layout Properties
|
|
201
|
+
|
|
202
|
+
- `columnCount` - Multi-column layout count
|
|
203
|
+
- `rowCount` - Row layout count
|
|
204
|
+
- `rowHeight` - Height of each row
|
|
205
|
+
- `maxRowHeight` - Maximum row height
|
|
206
|
+
- `minRowHeight` - Minimum row height
|
|
207
|
+
|
|
208
|
+
## Opacity & Visibility
|
|
209
|
+
|
|
210
|
+
- `opacity` - Element opacity (0-1)
|
|
211
|
+
|
|
212
|
+
**Class examples:** `opacity-50`, `opacity-100`
|
|
213
|
+
|
|
214
|
+
## Transformation Properties
|
|
215
|
+
|
|
216
|
+
- `rotate` - Rotation angle (degrees)
|
|
217
|
+
- `scale` - Scale factor
|
|
218
|
+
- `scaleX` - X axis scale
|
|
219
|
+
- `scaleY` - Y axis scale
|
|
220
|
+
- `origin` - Transform origin point
|
|
221
|
+
|
|
222
|
+
**Class examples:** `rotate-45`, `scale-110`, `origin-center`
|
|
223
|
+
|
|
224
|
+
## Animation Properties
|
|
225
|
+
|
|
226
|
+
- `duration` - Animation duration (milliseconds)
|
|
227
|
+
- `delay` - Animation delay (milliseconds)
|
|
228
|
+
- `repeat` / `repeatCount` - Repeat count
|
|
229
|
+
- `timeout` - Timeout duration
|
|
230
|
+
- `countDownDuration` - Countdown timer duration
|
|
231
|
+
|
|
232
|
+
**Class examples:** `duration-300`, `delay-150`, `repeat-3`
|
|
233
|
+
|
|
234
|
+
## Z-Index & Layering
|
|
235
|
+
|
|
236
|
+
- `zIndex` / `z` - Stack order
|
|
237
|
+
|
|
238
|
+
**Class examples:** `z-10`, `z-50`, `z-auto`
|
|
239
|
+
|
|
240
|
+
## Shadow Properties
|
|
241
|
+
|
|
242
|
+
- `shadowRadius` - Shadow blur radius
|
|
243
|
+
- `elevation` - Android elevation (shadow)
|
|
244
|
+
|
|
245
|
+
## Section Properties
|
|
246
|
+
|
|
247
|
+
- `sectionHeaderTopPadding` - Section header padding
|
|
248
|
+
|
|
249
|
+
## Separator Properties
|
|
250
|
+
|
|
251
|
+
- `separatorHeight` - Separator line height
|
|
252
|
+
|
|
253
|
+
## Paging Properties
|
|
254
|
+
|
|
255
|
+
- `pagingControlHeight` - Paging control height
|
|
256
|
+
- `pagingControlAlpha` - Paging control opacity
|
|
257
|
+
- `pagingControlTimeout` - Paging auto-scroll timeout
|
|
258
|
+
|
|
259
|
+
## Zoom Properties
|
|
260
|
+
|
|
261
|
+
- `zoomScale` - Current zoom level
|
|
262
|
+
- `minZoomScale` - Minimum zoom
|
|
263
|
+
- `maxZoomScale` - Maximum zoom
|
|
264
|
+
- `scalesPageToFit` - Auto-scale to fit
|
|
265
|
+
|
|
266
|
+
## Button Properties
|
|
267
|
+
|
|
268
|
+
- `leftButtonPadding` - Left button padding
|
|
269
|
+
- `rightButtonPadding` - Right button padding
|
|
270
|
+
|
|
271
|
+
## Left/Right Width
|
|
272
|
+
|
|
273
|
+
- `leftWidth` / `lw` - Left width
|
|
274
|
+
- `rightWidth` / `rw` - Right width
|
|
275
|
+
|
|
276
|
+
## Cache Properties
|
|
277
|
+
|
|
278
|
+
- `cacheSize` - Cache size limit
|
|
279
|
+
|
|
280
|
+
## Other Properties
|
|
281
|
+
|
|
282
|
+
- `activeTab` - Active tab index
|
|
283
|
+
- `indentionLevel` - Indentation level
|
|
284
|
+
- `keyboardToolbarHeight` - Keyboard toolbar height
|
|
285
|
+
- `shiftMode` - Shift mode for text fields
|
|
286
|
+
|
|
287
|
+
## Quick Reference Table
|
|
288
|
+
|
|
289
|
+
| Category | Property | Class Prefix Example |
|
|
290
|
+
| -------------- | --------------------- | ---------------------------------------- |
|
|
291
|
+
| **Background** | backgroundColor | `bg-*` |
|
|
292
|
+
| | backgroundGradient | `from-*`, `to-*` |
|
|
293
|
+
| **Text** | color/textColor | `text-*` |
|
|
294
|
+
| | hintTextColor | `placeholder-*` |
|
|
295
|
+
| **Border** | borderColor | `border-*` |
|
|
296
|
+
| | borderWidth | `border-*` |
|
|
297
|
+
| | borderRadius | `rounded-*` |
|
|
298
|
+
| **Spacing** | margin | `m-*`, `mt-*`, `mb-*`, `ml-*`, `mr-*` |
|
|
299
|
+
| | padding | `p-*`, `pt-*`, `pb-*`, `pl-*`, `pr-*` |
|
|
300
|
+
| **Dimensions** | width | `w-*` |
|
|
301
|
+
| | height | `h-*` |
|
|
302
|
+
| **Position** | top/right/bottom/left | `top-*`, `right-*`, `bottom-*`, `left-*` |
|
|
303
|
+
| **Typography** | fontFamily | `font-*` |
|
|
304
|
+
| | fontSize | `text-*`, `text-size-*` |
|
|
305
|
+
| **Transform** | rotate | `rotate-*` |
|
|
306
|
+
| | scale | `scale-*` |
|
|
307
|
+
| **Animation** | duration | `duration-*` |
|
|
308
|
+
| | delay | `delay-*` |
|
|
309
|
+
| **Z-Index** | zIndex | `z-*` |
|
|
310
|
+
|
|
311
|
+
## Customizing in config.cjs
|
|
312
|
+
|
|
313
|
+
### Override Default Values
|
|
314
|
+
|
|
315
|
+
```javascript
|
|
316
|
+
theme: {
|
|
317
|
+
spacing: {
|
|
318
|
+
sm: 8,
|
|
319
|
+
md: 12,
|
|
320
|
+
lg: 16,
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Extend Default Values
|
|
326
|
+
|
|
327
|
+
```javascript
|
|
328
|
+
theme: {
|
|
329
|
+
extend: {
|
|
330
|
+
colors: {
|
|
331
|
+
brand: '#007AFF',
|
|
332
|
+
},
|
|
333
|
+
spacing: {
|
|
334
|
+
'72': '18rem',
|
|
335
|
+
'84': '21rem',
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Mix Override and Extend
|
|
342
|
+
|
|
343
|
+
```javascript
|
|
344
|
+
theme: {
|
|
345
|
+
// Override default opacity
|
|
346
|
+
opacity: {
|
|
347
|
+
15: '0.15',
|
|
348
|
+
35: '0.35',
|
|
349
|
+
},
|
|
350
|
+
// Extend colors
|
|
351
|
+
extend: {
|
|
352
|
+
colors: {
|
|
353
|
+
brand: '#007AFF',
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
## Practical Examples
|
|
360
|
+
|
|
361
|
+
### Complete Brand Color System
|
|
362
|
+
|
|
363
|
+
```javascript
|
|
364
|
+
// config.cjs
|
|
365
|
+
module.exports = {
|
|
366
|
+
theme: {
|
|
367
|
+
extend: {
|
|
368
|
+
colors: {
|
|
369
|
+
brand: {
|
|
370
|
+
50: '#edfaff',
|
|
371
|
+
100: '#d6f2ff',
|
|
372
|
+
200: '#b5eaff',
|
|
373
|
+
300: '#83dfff',
|
|
374
|
+
400: '#48cbff',
|
|
375
|
+
500: '#1eacff',
|
|
376
|
+
600: '#068eff',
|
|
377
|
+
700: '#007aff', // Primary
|
|
378
|
+
800: '#085dc5',
|
|
379
|
+
900: '#0d519b',
|
|
380
|
+
950: '#0e315d',
|
|
381
|
+
DEFAULT: '#007aff' // Allows 'bg-brand' without shade
|
|
382
|
+
},
|
|
383
|
+
success: '#22c55e',
|
|
384
|
+
warning: '#f59e0b',
|
|
385
|
+
error: '#ef4444',
|
|
386
|
+
info: '#3b82f6'
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Usage:**
|
|
394
|
+
```xml
|
|
395
|
+
<Button class="bg-brand text-white" />
|
|
396
|
+
<Button class="bg-brand-700 text-brand-100" />
|
|
397
|
+
<Label class="text-success" text="Saved!" />
|
|
398
|
+
<Label class="text-error" text="Error occurred" />
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Custom Spacing Scale
|
|
402
|
+
|
|
403
|
+
```javascript
|
|
404
|
+
// config.cjs
|
|
405
|
+
module.exports = {
|
|
406
|
+
theme: {
|
|
407
|
+
spacing: {
|
|
408
|
+
// Mobile-first spacing
|
|
409
|
+
'xs': 4,
|
|
410
|
+
'sm': 8,
|
|
411
|
+
'md': 16,
|
|
412
|
+
'lg': 24,
|
|
413
|
+
'xl': 32,
|
|
414
|
+
'2xl': 48,
|
|
415
|
+
'3xl': 64,
|
|
416
|
+
// Screen percentages
|
|
417
|
+
'screen-10': '10%',
|
|
418
|
+
'screen-25': '25%',
|
|
419
|
+
'screen-50': '50%'
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Generated classes:**
|
|
426
|
+
```tss
|
|
427
|
+
/* Width */
|
|
428
|
+
'.w-xs': { width: 4 }
|
|
429
|
+
'.w-sm': { width: 8 }
|
|
430
|
+
'.w-screen-50': { width: '50%' }
|
|
431
|
+
|
|
432
|
+
/* Margin */
|
|
433
|
+
'.m-md': { top: 16, right: 16, bottom: 16, left: 16 }
|
|
434
|
+
'.mt-lg': { top: 24 }
|
|
435
|
+
|
|
436
|
+
/* Padding */
|
|
437
|
+
'.p-xl': { padding: { top: 32, right: 32, bottom: 32, left: 32 } }
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Custom Font Family System
|
|
441
|
+
|
|
442
|
+
```javascript
|
|
443
|
+
// config.cjs
|
|
444
|
+
module.exports = {
|
|
445
|
+
theme: {
|
|
446
|
+
fontFamily: {
|
|
447
|
+
'sans': 'Roboto-Regular',
|
|
448
|
+
'sans-medium': 'Roboto-Medium',
|
|
449
|
+
'sans-bold': 'Roboto-Bold',
|
|
450
|
+
'serif': 'Merriweather-Regular',
|
|
451
|
+
'mono': 'FiraCode-Regular',
|
|
452
|
+
'display': 'Montserrat-Bold'
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
**Usage:**
|
|
459
|
+
```xml
|
|
460
|
+
<Label class="font-sans text-lg" />
|
|
461
|
+
<Label class="font-display text-3xl" />
|
|
462
|
+
<Label class="font-mono text-sm" />
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Custom Border Radius Scale
|
|
466
|
+
|
|
467
|
+
```javascript
|
|
468
|
+
// config.cjs
|
|
469
|
+
module.exports = {
|
|
470
|
+
theme: {
|
|
471
|
+
borderRadius: {
|
|
472
|
+
'none': 0,
|
|
473
|
+
'sm': 4,
|
|
474
|
+
'DEFAULT': 8,
|
|
475
|
+
'md': 12,
|
|
476
|
+
'lg': 16,
|
|
477
|
+
'xl': 24,
|
|
478
|
+
'2xl': 32,
|
|
479
|
+
'card': 20,
|
|
480
|
+
'button': 12,
|
|
481
|
+
'input': 8
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
**Usage:**
|
|
488
|
+
```xml
|
|
489
|
+
<View class="rounded-card bg-white" />
|
|
490
|
+
<Button class="rounded-button bg-brand" />
|
|
491
|
+
<TextField class="rounded-input border-gray-300" />
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Complete Card Component via Ti Element
|
|
495
|
+
|
|
496
|
+
```javascript
|
|
497
|
+
// config.cjs
|
|
498
|
+
module.exports = {
|
|
499
|
+
purge: { mode: 'all' }, // Required for Ti Elements
|
|
500
|
+
theme: {
|
|
501
|
+
// Style all Views with specific patterns
|
|
502
|
+
View: {
|
|
503
|
+
DEFAULT: {
|
|
504
|
+
width: 'Ti.UI.SIZE',
|
|
505
|
+
height: 'Ti.UI.SIZE'
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
// Custom card class
|
|
509
|
+
'.card': {
|
|
510
|
+
DEFAULT: {
|
|
511
|
+
backgroundColor: '#ffffff',
|
|
512
|
+
borderRadius: 16,
|
|
513
|
+
borderWidth: 1,
|
|
514
|
+
borderColor: '#e5e7eb'
|
|
515
|
+
},
|
|
516
|
+
ios: {
|
|
517
|
+
clipMode: 'Ti.UI.iOS.CLIP_MODE_ENABLED'
|
|
518
|
+
},
|
|
519
|
+
android: {
|
|
520
|
+
elevation: 4
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
'.card-header': {
|
|
524
|
+
apply: 'p-4 border-b border-gray-200'
|
|
525
|
+
},
|
|
526
|
+
'.card-body': {
|
|
527
|
+
apply: 'p-4'
|
|
528
|
+
},
|
|
529
|
+
'.card-footer': {
|
|
530
|
+
apply: 'p-4 border-t border-gray-100 bg-gray-50'
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**Usage:**
|
|
537
|
+
```xml
|
|
538
|
+
<View class="card m-4">
|
|
539
|
+
<View class="card-header vertical">
|
|
540
|
+
<Label class="text-lg font-bold text-gray-900" text="Card Title" />
|
|
541
|
+
</View>
|
|
542
|
+
<View class="card-body vertical">
|
|
543
|
+
<Label class="text-gray-600" text="Card content goes here" />
|
|
544
|
+
</View>
|
|
545
|
+
<View class="card-footer">
|
|
546
|
+
<Button class="bg-brand rounded-lg text-white" title="Action" />
|
|
547
|
+
</View>
|
|
548
|
+
</View>
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Button System with Variants
|
|
552
|
+
|
|
553
|
+
```javascript
|
|
554
|
+
// config.cjs
|
|
555
|
+
module.exports = {
|
|
556
|
+
theme: {
|
|
557
|
+
extend: {
|
|
558
|
+
colors: {
|
|
559
|
+
brand: { 500: '#007aff', 600: '#0066dd', 100: '#e0f0ff' }
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
// Base button
|
|
563
|
+
'.btn': {
|
|
564
|
+
apply: 'font-bold rounded-lg h-12 px-6'
|
|
565
|
+
},
|
|
566
|
+
// Variants
|
|
567
|
+
'.btn-primary': {
|
|
568
|
+
apply: 'bg-brand-500 text-white'
|
|
569
|
+
},
|
|
570
|
+
'.btn-secondary': {
|
|
571
|
+
apply: 'bg-gray-200 text-gray-800'
|
|
572
|
+
},
|
|
573
|
+
'.btn-outline': {
|
|
574
|
+
apply: 'border-2 border-brand-500 text-brand-500 bg-transparent'
|
|
575
|
+
},
|
|
576
|
+
'.btn-ghost': {
|
|
577
|
+
apply: 'bg-transparent text-brand-500'
|
|
578
|
+
},
|
|
579
|
+
// Sizes
|
|
580
|
+
'.btn-sm': {
|
|
581
|
+
apply: 'h-8 px-3 text-sm'
|
|
582
|
+
},
|
|
583
|
+
'.btn-lg': {
|
|
584
|
+
apply: 'h-14 px-8 text-lg'
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
**Usage:**
|
|
591
|
+
```xml
|
|
592
|
+
<Button class="btn btn-primary" title="Submit" />
|
|
593
|
+
<Button class="btn btn-outline" title="Cancel" />
|
|
594
|
+
<Button class="btn btn-secondary btn-sm" title="Small" />
|
|
595
|
+
<Button class="btn btn-primary btn-lg" title="Large Action" />
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
### Form Input System
|
|
599
|
+
|
|
600
|
+
```javascript
|
|
601
|
+
// config.cjs
|
|
602
|
+
module.exports = {
|
|
603
|
+
theme: {
|
|
604
|
+
TextField: {
|
|
605
|
+
DEFAULT: {
|
|
606
|
+
height: 48,
|
|
607
|
+
borderRadius: 8,
|
|
608
|
+
borderWidth: 1,
|
|
609
|
+
borderColor: '#d1d5db',
|
|
610
|
+
paddingLeft: 16,
|
|
611
|
+
paddingRight: 16,
|
|
612
|
+
backgroundColor: '#ffffff',
|
|
613
|
+
color: '#111827',
|
|
614
|
+
hintTextColor: '#9ca3af'
|
|
615
|
+
},
|
|
616
|
+
android: {
|
|
617
|
+
touchFeedback: true
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
TextArea: {
|
|
621
|
+
DEFAULT: {
|
|
622
|
+
borderRadius: 8,
|
|
623
|
+
borderWidth: 1,
|
|
624
|
+
borderColor: '#d1d5db',
|
|
625
|
+
padding: { top: 12, right: 16, bottom: 12, left: 16 },
|
|
626
|
+
backgroundColor: '#ffffff',
|
|
627
|
+
color: '#111827',
|
|
628
|
+
hintTextColor: '#9ca3af'
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
'.input-error': {
|
|
632
|
+
apply: 'border-red-500 bg-red-50'
|
|
633
|
+
},
|
|
634
|
+
'.input-success': {
|
|
635
|
+
apply: 'border-green-500 bg-green-50'
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
**Usage:**
|
|
642
|
+
```xml
|
|
643
|
+
<TextField hintText="Email address" />
|
|
644
|
+
<TextField class="input-error" hintText="Invalid email" />
|
|
645
|
+
<TextArea hintText="Your message..." />
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
## Related References
|
|
649
|
+
|
|
650
|
+
- [Deep Customization](customization-deep-dive.md) - Config.cjs structure and usage
|
|
651
|
+
- [Arbitrary Values](arbitrary-values.md) - Using custom values with parentheses notation
|
|
652
|
+
- [Platform Modifiers](platform-modifiers.md) - Platform-specific customization
|
|
653
|
+
- [Apply Directive](apply-directive.md) - Extracting utility combinations
|
|
654
|
+
- [Custom Rules](custom-rules.md) - Styling Ti Elements, IDs, and classes
|