flutterflow-mcp 0.1.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/README.md +124 -0
- package/build/api/flutterflow.d.ts +11 -0
- package/build/api/flutterflow.js +61 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +54 -0
- package/build/prompts/dev-workflow.d.ts +2 -0
- package/build/prompts/dev-workflow.js +68 -0
- package/build/prompts/generate-page.d.ts +2 -0
- package/build/prompts/generate-page.js +36 -0
- package/build/prompts/inspect-project.d.ts +2 -0
- package/build/prompts/inspect-project.js +30 -0
- package/build/prompts/modify-component.d.ts +2 -0
- package/build/prompts/modify-component.js +39 -0
- package/build/resources/docs.d.ts +2 -0
- package/build/resources/docs.js +76 -0
- package/build/resources/projects.d.ts +3 -0
- package/build/resources/projects.js +60 -0
- package/build/tools/find-component-usages.d.ts +7 -0
- package/build/tools/find-component-usages.js +225 -0
- package/build/tools/find-page-navigations.d.ts +7 -0
- package/build/tools/find-page-navigations.js +228 -0
- package/build/tools/get-component-summary.d.ts +22 -0
- package/build/tools/get-component-summary.js +193 -0
- package/build/tools/get-page-by-name.d.ts +3 -0
- package/build/tools/get-page-by-name.js +56 -0
- package/build/tools/get-page-summary.d.ts +22 -0
- package/build/tools/get-page-summary.js +220 -0
- package/build/tools/get-yaml-docs.d.ts +6 -0
- package/build/tools/get-yaml-docs.js +217 -0
- package/build/tools/get-yaml.d.ts +3 -0
- package/build/tools/get-yaml.js +47 -0
- package/build/tools/list-files.d.ts +3 -0
- package/build/tools/list-files.js +30 -0
- package/build/tools/list-pages.d.ts +25 -0
- package/build/tools/list-pages.js +101 -0
- package/build/tools/list-projects.d.ts +3 -0
- package/build/tools/list-projects.js +19 -0
- package/build/tools/sync-project.d.ts +3 -0
- package/build/tools/sync-project.js +144 -0
- package/build/tools/update-yaml.d.ts +3 -0
- package/build/tools/update-yaml.js +24 -0
- package/build/tools/validate-yaml.d.ts +3 -0
- package/build/tools/validate-yaml.js +22 -0
- package/build/utils/cache.d.ts +48 -0
- package/build/utils/cache.js +162 -0
- package/build/utils/decode-yaml.d.ts +7 -0
- package/build/utils/decode-yaml.js +31 -0
- package/build/utils/page-summary/action-summarizer.d.ts +9 -0
- package/build/utils/page-summary/action-summarizer.js +291 -0
- package/build/utils/page-summary/formatter.d.ts +13 -0
- package/build/utils/page-summary/formatter.js +121 -0
- package/build/utils/page-summary/node-extractor.d.ts +17 -0
- package/build/utils/page-summary/node-extractor.js +207 -0
- package/build/utils/page-summary/tree-walker.d.ts +6 -0
- package/build/utils/page-summary/tree-walker.js +55 -0
- package/build/utils/page-summary/types.d.ts +56 -0
- package/build/utils/page-summary/types.js +4 -0
- package/build/utils/parse-folders.d.ts +9 -0
- package/build/utils/parse-folders.js +29 -0
- package/docs/ff-yaml/00-overview.md +137 -0
- package/docs/ff-yaml/01-project-files.md +513 -0
- package/docs/ff-yaml/02-pages.md +572 -0
- package/docs/ff-yaml/03-components.md +413 -0
- package/docs/ff-yaml/04-widgets/README.md +122 -0
- package/docs/ff-yaml/04-widgets/button.md +444 -0
- package/docs/ff-yaml/04-widgets/container.md +358 -0
- package/docs/ff-yaml/04-widgets/dropdown.md +579 -0
- package/docs/ff-yaml/04-widgets/form.md +256 -0
- package/docs/ff-yaml/04-widgets/image.md +276 -0
- package/docs/ff-yaml/04-widgets/layout.md +355 -0
- package/docs/ff-yaml/04-widgets/misc.md +553 -0
- package/docs/ff-yaml/04-widgets/text-field.md +326 -0
- package/docs/ff-yaml/04-widgets/text.md +302 -0
- package/docs/ff-yaml/05-actions.md +843 -0
- package/docs/ff-yaml/06-variables.md +834 -0
- package/docs/ff-yaml/07-data.md +591 -0
- package/docs/ff-yaml/08-custom-code.md +715 -0
- package/docs/ff-yaml/09-theming.md +592 -0
- package/docs/ff-yaml/10-editing-guide.md +454 -0
- package/docs/ff-yaml/README.md +105 -0
- package/package.json +55 -0
- package/skills/ff-widget-patterns.md +141 -0
- package/skills/ff-yaml-dev.md +58 -0
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
# DropDown and ChoiceChips
|
|
2
|
+
|
|
3
|
+
## DropDown
|
|
4
|
+
|
|
5
|
+
### Minimal Example
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
key: DropDown_xxxxxxxx
|
|
9
|
+
type: DropDown
|
|
10
|
+
props:
|
|
11
|
+
padding: {}
|
|
12
|
+
dropDown:
|
|
13
|
+
dimensions:
|
|
14
|
+
width:
|
|
15
|
+
pixelsValue:
|
|
16
|
+
inputValue: 120
|
|
17
|
+
textStyle:
|
|
18
|
+
themeStyle: BODY_MEDIUM
|
|
19
|
+
optionsLabels:
|
|
20
|
+
values:
|
|
21
|
+
- translatableText:
|
|
22
|
+
textValue:
|
|
23
|
+
inputValue: Option A
|
|
24
|
+
- translatableText:
|
|
25
|
+
textValue:
|
|
26
|
+
inputValue: Option B
|
|
27
|
+
optionsValues:
|
|
28
|
+
values:
|
|
29
|
+
- serializedValue: a
|
|
30
|
+
- serializedValue: b
|
|
31
|
+
hintText: {}
|
|
32
|
+
valueType:
|
|
33
|
+
dataType:
|
|
34
|
+
scalarType: String
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Full Schema
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
key: DropDown_xxxxxxxx
|
|
41
|
+
type: DropDown
|
|
42
|
+
props:
|
|
43
|
+
padding: {}
|
|
44
|
+
alignment: # Position within parent
|
|
45
|
+
xValue:
|
|
46
|
+
inputValue: 0
|
|
47
|
+
mostRecentInputValue: 0
|
|
48
|
+
yValue:
|
|
49
|
+
inputValue: 0
|
|
50
|
+
mostRecentInputValue: 0
|
|
51
|
+
dropDown:
|
|
52
|
+
dimensions: # Dropdown button size
|
|
53
|
+
width:
|
|
54
|
+
pixelsValue:
|
|
55
|
+
inputValue: 120
|
|
56
|
+
mostRecentInputValue: 120
|
|
57
|
+
height:
|
|
58
|
+
pixelsValue:
|
|
59
|
+
inputValue: 24
|
|
60
|
+
mostRecentInputValue: 24
|
|
61
|
+
textStyle: # Selected value text style
|
|
62
|
+
themeStyle: BODY_MEDIUM
|
|
63
|
+
colorValue:
|
|
64
|
+
inputValue:
|
|
65
|
+
themeColor: PRIMARY_TEXT
|
|
66
|
+
mostRecentInputValue:
|
|
67
|
+
themeColor: PRIMARY_TEXT
|
|
68
|
+
fontWeightValue:
|
|
69
|
+
inputValue: w400
|
|
70
|
+
margin: # Outer margin
|
|
71
|
+
type: FF_PADDING_ONLY
|
|
72
|
+
leftValue:
|
|
73
|
+
inputValue: 4
|
|
74
|
+
topValue:
|
|
75
|
+
inputValue: 0
|
|
76
|
+
rightValue:
|
|
77
|
+
inputValue: 110
|
|
78
|
+
bottomValue:
|
|
79
|
+
inputValue: 8
|
|
80
|
+
initialOption: # Initially selected option
|
|
81
|
+
textValue:
|
|
82
|
+
inputValue: Default Value # Literal default
|
|
83
|
+
# OR variable binding:
|
|
84
|
+
# variable:
|
|
85
|
+
# source: LOCAL_STATE
|
|
86
|
+
# baseVariable:
|
|
87
|
+
# localState:
|
|
88
|
+
# fieldIdentifier:
|
|
89
|
+
# name: distanceFilter
|
|
90
|
+
# key: gpp6v8yz
|
|
91
|
+
# stateVariableType: APP_STATE
|
|
92
|
+
hintText: {} # Hint/placeholder text
|
|
93
|
+
optionsHasKeyValues: false # Whether options use key-value pairs
|
|
94
|
+
valueType: # Data type of option values
|
|
95
|
+
dataType:
|
|
96
|
+
scalarType: String # String | Integer | Double
|
|
97
|
+
searchHintText: # Search field placeholder
|
|
98
|
+
themeStyle: LABEL_MEDIUM
|
|
99
|
+
translationIdentifier:
|
|
100
|
+
key: mw7ulp44
|
|
101
|
+
textValue:
|
|
102
|
+
inputValue: Search for an item...
|
|
103
|
+
mostRecentInputValue: Search for an item...
|
|
104
|
+
fixPosition: true # Pin dropdown position
|
|
105
|
+
searchTextStyle: # Search input text style
|
|
106
|
+
themeStyle: BODY_MEDIUM
|
|
107
|
+
label: # Label above dropdown
|
|
108
|
+
themeStyle: LABEL_MEDIUM
|
|
109
|
+
textAlignValue:
|
|
110
|
+
inputValue: ALIGN_START
|
|
111
|
+
fillColorValue: # Dropdown background color
|
|
112
|
+
inputValue:
|
|
113
|
+
themeColor: SECONDARY_BACKGROUND
|
|
114
|
+
mostRecentInputValue:
|
|
115
|
+
themeColor: SECONDARY_BACKGROUND
|
|
116
|
+
elevationValue: # Dropdown menu elevation
|
|
117
|
+
inputValue: 2
|
|
118
|
+
mostRecentInputValue: 2
|
|
119
|
+
borderRadiusValue: # Corner radius
|
|
120
|
+
inputValue: 8
|
|
121
|
+
mostRecentInputValue: 8
|
|
122
|
+
borderColorValue: # Border color
|
|
123
|
+
inputValue:
|
|
124
|
+
themeColor: PRIMARY_BACKGROUND
|
|
125
|
+
mostRecentInputValue:
|
|
126
|
+
themeColor: PRIMARY_BACKGROUND
|
|
127
|
+
borderWidthValue: # Border width
|
|
128
|
+
inputValue: 2
|
|
129
|
+
mostRecentInputValue: 2
|
|
130
|
+
hidesUnderlineValue: # Remove default underline
|
|
131
|
+
inputValue: true
|
|
132
|
+
mostRecentInputValue: true
|
|
133
|
+
iconValue: # Dropdown arrow icon
|
|
134
|
+
inputValue:
|
|
135
|
+
sizeValue:
|
|
136
|
+
inputValue: 24
|
|
137
|
+
mostRecentInputValue: 24
|
|
138
|
+
colorValue:
|
|
139
|
+
inputValue:
|
|
140
|
+
themeColor: PRIMARY
|
|
141
|
+
mostRecentInputValue:
|
|
142
|
+
themeColor: PRIMARY
|
|
143
|
+
iconDataValue:
|
|
144
|
+
inputValue:
|
|
145
|
+
codePoint: 63531
|
|
146
|
+
family: MaterialIcons
|
|
147
|
+
matchTextDirection: false
|
|
148
|
+
name: keyboard_arrow_down_rounded
|
|
149
|
+
initialOptionKeyValue: # Initial option by key (for key-value options)
|
|
150
|
+
values:
|
|
151
|
+
- serializedValue: ""
|
|
152
|
+
# OR variable binding
|
|
153
|
+
optionsLabels: # Display labels for options
|
|
154
|
+
values:
|
|
155
|
+
- translatableText:
|
|
156
|
+
translationIdentifier:
|
|
157
|
+
key: 71cukul3
|
|
158
|
+
textValue:
|
|
159
|
+
inputValue: Highest Discount
|
|
160
|
+
mostRecentInputValue: Highest Discount
|
|
161
|
+
- translatableText:
|
|
162
|
+
translationIdentifier:
|
|
163
|
+
key: 5dzv467y
|
|
164
|
+
textValue:
|
|
165
|
+
inputValue: Closest To Me
|
|
166
|
+
mostRecentInputValue: Closest To Me
|
|
167
|
+
optionsValues: # Internal values for options
|
|
168
|
+
values:
|
|
169
|
+
- serializedValue: Discount
|
|
170
|
+
- serializedValue: Closes
|
|
171
|
+
visibility: # Conditional visibility
|
|
172
|
+
visibleValue:
|
|
173
|
+
variable:
|
|
174
|
+
source: FUNCTION_CALL
|
|
175
|
+
functionCall:
|
|
176
|
+
values:
|
|
177
|
+
- variable:
|
|
178
|
+
source: LOCAL_STATE
|
|
179
|
+
baseVariable:
|
|
180
|
+
localState:
|
|
181
|
+
fieldIdentifier:
|
|
182
|
+
name: email
|
|
183
|
+
key: x2tvdt22
|
|
184
|
+
stateVariableType: APP_STATE
|
|
185
|
+
- inputValue:
|
|
186
|
+
serializedValue: SOME_VALUE
|
|
187
|
+
condition:
|
|
188
|
+
relation: EQUAL_TO
|
|
189
|
+
uiBuilderValue:
|
|
190
|
+
serializedValue: "false"
|
|
191
|
+
mostRecentInputValue: false
|
|
192
|
+
responsiveVisibility: {}
|
|
193
|
+
name: DDS # Human-readable name
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Field Reference
|
|
197
|
+
|
|
198
|
+
| Field | Type | Required | Notes |
|
|
199
|
+
|-------|------|----------|-------|
|
|
200
|
+
| `dimensions` | object | No | Size of dropdown button |
|
|
201
|
+
| `textStyle` | object | No | Style for selected value text |
|
|
202
|
+
| `margin` | object | No | Outer margin around dropdown |
|
|
203
|
+
| `initialOption.textValue` | object | No | Default selected value |
|
|
204
|
+
| `hintText` | object | No | Placeholder when nothing selected |
|
|
205
|
+
| `optionsHasKeyValues` | bool | No | Use key-value option pairs |
|
|
206
|
+
| `valueType.dataType.scalarType` | string | No | Data type: `String`, `Integer`, `Double` |
|
|
207
|
+
| `searchHintText` | object | No | Search field hint text |
|
|
208
|
+
| `fixPosition` | bool | No | Pin dropdown position |
|
|
209
|
+
| `label` | object | No | Label text above dropdown |
|
|
210
|
+
| `fillColorValue.inputValue` | object | No | Background fill color |
|
|
211
|
+
| `elevationValue.inputValue` | number | No | Menu shadow elevation |
|
|
212
|
+
| `borderRadiusValue.inputValue` | number | No | Corner radius |
|
|
213
|
+
| `borderColorValue.inputValue` | object | No | Border color |
|
|
214
|
+
| `borderWidthValue.inputValue` | number | No | Border width |
|
|
215
|
+
| `hidesUnderlineValue.inputValue` | bool | No | Remove underline decoration |
|
|
216
|
+
| `iconValue.inputValue` | object | No | Dropdown arrow icon |
|
|
217
|
+
| `optionsLabels.values` | array | Yes | Display text for each option |
|
|
218
|
+
| `optionsValues.values` | array | Yes | Internal value for each option |
|
|
219
|
+
| `initialOptionKeyValue.values` | array | No | Initial option by key reference |
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## ChoiceChips
|
|
224
|
+
|
|
225
|
+
### Minimal Example
|
|
226
|
+
|
|
227
|
+
```yaml
|
|
228
|
+
key: ChoiceChips_xxxxxxxx
|
|
229
|
+
type: ChoiceChips
|
|
230
|
+
props:
|
|
231
|
+
choiceChips:
|
|
232
|
+
options:
|
|
233
|
+
- label:
|
|
234
|
+
textValue:
|
|
235
|
+
inputValue: Option A
|
|
236
|
+
- label:
|
|
237
|
+
textValue:
|
|
238
|
+
inputValue: Option B
|
|
239
|
+
selectedChipStyle:
|
|
240
|
+
textStyle:
|
|
241
|
+
themeStyle: BODY_MEDIUM
|
|
242
|
+
backgroundColorValue:
|
|
243
|
+
inputValue:
|
|
244
|
+
themeColor: PRIMARY
|
|
245
|
+
unselectedChipStyle:
|
|
246
|
+
textStyle:
|
|
247
|
+
themeStyle: BODY_MEDIUM
|
|
248
|
+
backgroundColorValue:
|
|
249
|
+
inputValue:
|
|
250
|
+
themeColor: SECONDARY_BACKGROUND
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Full Schema
|
|
254
|
+
|
|
255
|
+
```yaml
|
|
256
|
+
key: ChoiceChips_xxxxxxxx
|
|
257
|
+
type: ChoiceChips
|
|
258
|
+
props:
|
|
259
|
+
padding:
|
|
260
|
+
topValue:
|
|
261
|
+
inputValue: 5
|
|
262
|
+
bottomValue:
|
|
263
|
+
inputValue: 5
|
|
264
|
+
expanded:
|
|
265
|
+
expandedType: UNEXPANDED
|
|
266
|
+
choiceChips:
|
|
267
|
+
options: # Array of chip options
|
|
268
|
+
- iconData: # Optional icon per chip
|
|
269
|
+
codePoint: 59889
|
|
270
|
+
family: Tabler-Icons
|
|
271
|
+
matchTextDirection: false
|
|
272
|
+
name: mapPin
|
|
273
|
+
isCustom: true
|
|
274
|
+
label: # Chip label text
|
|
275
|
+
translationIdentifier:
|
|
276
|
+
key: twb1c9ul
|
|
277
|
+
textValue:
|
|
278
|
+
inputValue: Nearby
|
|
279
|
+
- iconData:
|
|
280
|
+
codePoint: 63421
|
|
281
|
+
family: Tabler-Icons
|
|
282
|
+
matchTextDirection: false
|
|
283
|
+
name: grillFork
|
|
284
|
+
isCustom: true
|
|
285
|
+
label:
|
|
286
|
+
translationIdentifier:
|
|
287
|
+
key: xmkvmsha
|
|
288
|
+
textValue:
|
|
289
|
+
inputValue: Food
|
|
290
|
+
- iconData:
|
|
291
|
+
codePoint: 984739
|
|
292
|
+
family: MaterialIcons
|
|
293
|
+
matchTextDirection: false
|
|
294
|
+
name: discount_outlined
|
|
295
|
+
label:
|
|
296
|
+
translationIdentifier:
|
|
297
|
+
key: e4th7qdd
|
|
298
|
+
textValue:
|
|
299
|
+
inputValue: Entertainment
|
|
300
|
+
selectedChipStyle: # Style when chip is selected
|
|
301
|
+
textStyle:
|
|
302
|
+
themeStyle: BODY_MEDIUM
|
|
303
|
+
colorValue:
|
|
304
|
+
inputValue:
|
|
305
|
+
themeColor: INFO
|
|
306
|
+
labelPadding:
|
|
307
|
+
type: FF_PADDING_ONLY
|
|
308
|
+
topValue:
|
|
309
|
+
inputValue: 4
|
|
310
|
+
rightValue:
|
|
311
|
+
inputValue: 10
|
|
312
|
+
bottomValue:
|
|
313
|
+
inputValue: 4
|
|
314
|
+
allValue:
|
|
315
|
+
inputValue: 4
|
|
316
|
+
borderRadius:
|
|
317
|
+
type: FF_BORDER_RADIUS_ALL
|
|
318
|
+
allValue:
|
|
319
|
+
inputValue: 100 # Pill shape
|
|
320
|
+
backgroundColorValue:
|
|
321
|
+
inputValue:
|
|
322
|
+
value: "4278190080" # Black
|
|
323
|
+
iconColorValue:
|
|
324
|
+
inputValue:
|
|
325
|
+
themeColor: INFO
|
|
326
|
+
iconSizeValue:
|
|
327
|
+
inputValue: 16
|
|
328
|
+
elevationValue:
|
|
329
|
+
inputValue: 0
|
|
330
|
+
unselectedChipStyle: # Style when chip is not selected
|
|
331
|
+
textStyle:
|
|
332
|
+
themeStyle: BODY_MEDIUM
|
|
333
|
+
colorValue:
|
|
334
|
+
inputValue:
|
|
335
|
+
value: "4286614942"
|
|
336
|
+
fontWeightValue:
|
|
337
|
+
inputValue: w600
|
|
338
|
+
labelPadding:
|
|
339
|
+
topValue:
|
|
340
|
+
inputValue: 4
|
|
341
|
+
rightValue:
|
|
342
|
+
inputValue: 10
|
|
343
|
+
bottomValue:
|
|
344
|
+
inputValue: 4
|
|
345
|
+
borderRadius:
|
|
346
|
+
type: FF_BORDER_RADIUS_ALL
|
|
347
|
+
allValue:
|
|
348
|
+
inputValue: 100
|
|
349
|
+
backgroundColorValue:
|
|
350
|
+
inputValue:
|
|
351
|
+
themeColor: SECONDARY_BACKGROUND
|
|
352
|
+
iconColorValue:
|
|
353
|
+
inputValue:
|
|
354
|
+
themeColor: SECONDARY_TEXT
|
|
355
|
+
iconSizeValue:
|
|
356
|
+
inputValue: 16
|
|
357
|
+
elevationValue:
|
|
358
|
+
inputValue: 0
|
|
359
|
+
borderColorValue:
|
|
360
|
+
inputValue:
|
|
361
|
+
value: "4291415247"
|
|
362
|
+
initialOption: # Default selected chip
|
|
363
|
+
translationIdentifier:
|
|
364
|
+
key: n47l1c3n
|
|
365
|
+
textValue:
|
|
366
|
+
variable:
|
|
367
|
+
source: LOCAL_STATE
|
|
368
|
+
baseVariable:
|
|
369
|
+
localState:
|
|
370
|
+
fieldIdentifier:
|
|
371
|
+
name: TypeFilter
|
|
372
|
+
key: uudqi8wd
|
|
373
|
+
stateVariableType: APP_STATE
|
|
374
|
+
mostRecentInputValue: Nearby
|
|
375
|
+
childAlignment: wrap_start # Chip alignment within row
|
|
376
|
+
chipSpacingValue: # Horizontal spacing between chips
|
|
377
|
+
inputValue: 8
|
|
378
|
+
rowSpacingValue: # Vertical spacing between rows
|
|
379
|
+
inputValue: 8
|
|
380
|
+
wrappedValue: # Whether chips wrap to next line
|
|
381
|
+
inputValue: false
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Field Reference
|
|
385
|
+
|
|
386
|
+
| Field | Type | Required | Notes |
|
|
387
|
+
|-------|------|----------|-------|
|
|
388
|
+
| `options` | array | Yes | List of chip options |
|
|
389
|
+
| `options[].label.textValue.inputValue` | string | Yes | Chip label text |
|
|
390
|
+
| `options[].iconData` | object | No | Icon for each chip |
|
|
391
|
+
| `selectedChipStyle` | object | Yes | Visual style when selected |
|
|
392
|
+
| `selectedChipStyle.textStyle` | object | No | Text style |
|
|
393
|
+
| `selectedChipStyle.backgroundColorValue.inputValue` | object | No | Fill color |
|
|
394
|
+
| `selectedChipStyle.borderRadius` | object | No | Corner radius |
|
|
395
|
+
| `selectedChipStyle.iconColorValue.inputValue` | object | No | Icon color |
|
|
396
|
+
| `selectedChipStyle.iconSizeValue.inputValue` | number | No | Icon size |
|
|
397
|
+
| `selectedChipStyle.elevationValue.inputValue` | number | No | Shadow elevation |
|
|
398
|
+
| `selectedChipStyle.labelPadding` | object | No | Internal padding |
|
|
399
|
+
| `unselectedChipStyle` | object | Yes | Visual style when not selected |
|
|
400
|
+
| `initialOption.textValue` | object | No | Default selected chip value |
|
|
401
|
+
| `childAlignment` | enum | No | `wrap_start`, `wrap_center`, `wrap_end` |
|
|
402
|
+
| `chipSpacingValue.inputValue` | number | No | Horizontal gap between chips |
|
|
403
|
+
| `rowSpacingValue.inputValue` | number | No | Vertical gap between rows |
|
|
404
|
+
| `wrappedValue.inputValue` | bool | No | Whether chips wrap |
|
|
405
|
+
|
|
406
|
+
### Chip Style Properties
|
|
407
|
+
|
|
408
|
+
Both `selectedChipStyle` and `unselectedChipStyle` share the same shape:
|
|
409
|
+
|
|
410
|
+
```yaml
|
|
411
|
+
chipStyle:
|
|
412
|
+
textStyle: # Text styling
|
|
413
|
+
themeStyle: BODY_MEDIUM
|
|
414
|
+
colorValue:
|
|
415
|
+
inputValue: { themeColor: INFO }
|
|
416
|
+
fontWeightValue:
|
|
417
|
+
inputValue: w600
|
|
418
|
+
labelPadding: # Padding around label
|
|
419
|
+
type: FF_PADDING_ONLY
|
|
420
|
+
topValue: { inputValue: 4 }
|
|
421
|
+
rightValue: { inputValue: 10 }
|
|
422
|
+
bottomValue: { inputValue: 4 }
|
|
423
|
+
borderRadius: # Corner radius
|
|
424
|
+
type: FF_BORDER_RADIUS_ALL
|
|
425
|
+
allValue: { inputValue: 100 } # 100 = pill shape
|
|
426
|
+
backgroundColorValue: # Fill color
|
|
427
|
+
inputValue: { themeColor: PRIMARY }
|
|
428
|
+
borderColorValue: # Border color (usually on unselected)
|
|
429
|
+
inputValue: { value: "4291415247" }
|
|
430
|
+
iconColorValue: # Leading icon color
|
|
431
|
+
inputValue: { themeColor: INFO }
|
|
432
|
+
iconSizeValue: # Leading icon size
|
|
433
|
+
inputValue: 16
|
|
434
|
+
elevationValue: # Shadow elevation
|
|
435
|
+
inputValue: 0
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Real Example
|
|
439
|
+
|
|
440
|
+
**Category filter chips with icons:**
|
|
441
|
+
```yaml
|
|
442
|
+
key: ChoiceChips_wo1694dv
|
|
443
|
+
type: ChoiceChips
|
|
444
|
+
props:
|
|
445
|
+
padding:
|
|
446
|
+
topValue:
|
|
447
|
+
inputValue: 5
|
|
448
|
+
bottomValue:
|
|
449
|
+
inputValue: 5
|
|
450
|
+
expanded:
|
|
451
|
+
expandedType: UNEXPANDED
|
|
452
|
+
choiceChips:
|
|
453
|
+
options:
|
|
454
|
+
- iconData:
|
|
455
|
+
codePoint: 59889
|
|
456
|
+
family: Tabler-Icons
|
|
457
|
+
matchTextDirection: false
|
|
458
|
+
name: mapPin
|
|
459
|
+
isCustom: true
|
|
460
|
+
label:
|
|
461
|
+
translationIdentifier:
|
|
462
|
+
key: twb1c9ul
|
|
463
|
+
textValue:
|
|
464
|
+
inputValue: Nearby
|
|
465
|
+
- iconData:
|
|
466
|
+
codePoint: 63421
|
|
467
|
+
family: Tabler-Icons
|
|
468
|
+
matchTextDirection: false
|
|
469
|
+
name: grillFork
|
|
470
|
+
isCustom: true
|
|
471
|
+
label:
|
|
472
|
+
translationIdentifier:
|
|
473
|
+
key: xmkvmsha
|
|
474
|
+
textValue:
|
|
475
|
+
inputValue: Food
|
|
476
|
+
- iconData:
|
|
477
|
+
codePoint: 61029
|
|
478
|
+
family: Tabler-Icons
|
|
479
|
+
matchTextDirection: false
|
|
480
|
+
name: tool
|
|
481
|
+
isCustom: true
|
|
482
|
+
label:
|
|
483
|
+
translationIdentifier:
|
|
484
|
+
key: ktgo4894
|
|
485
|
+
textValue:
|
|
486
|
+
inputValue: Service
|
|
487
|
+
- iconData:
|
|
488
|
+
codePoint: 984739
|
|
489
|
+
family: MaterialIcons
|
|
490
|
+
matchTextDirection: false
|
|
491
|
+
name: discount_outlined
|
|
492
|
+
label:
|
|
493
|
+
translationIdentifier:
|
|
494
|
+
key: e4th7qdd
|
|
495
|
+
textValue:
|
|
496
|
+
inputValue: Entertainment
|
|
497
|
+
selectedChipStyle:
|
|
498
|
+
textStyle:
|
|
499
|
+
themeStyle: BODY_MEDIUM
|
|
500
|
+
colorValue:
|
|
501
|
+
inputValue:
|
|
502
|
+
themeColor: INFO
|
|
503
|
+
labelPadding:
|
|
504
|
+
type: FF_PADDING_ONLY
|
|
505
|
+
topValue:
|
|
506
|
+
inputValue: 4
|
|
507
|
+
rightValue:
|
|
508
|
+
inputValue: 10
|
|
509
|
+
bottomValue:
|
|
510
|
+
inputValue: 4
|
|
511
|
+
allValue:
|
|
512
|
+
inputValue: 4
|
|
513
|
+
borderRadius:
|
|
514
|
+
type: FF_BORDER_RADIUS_ALL
|
|
515
|
+
allValue:
|
|
516
|
+
inputValue: 100
|
|
517
|
+
backgroundColorValue:
|
|
518
|
+
inputValue:
|
|
519
|
+
value: "4278190080"
|
|
520
|
+
iconColorValue:
|
|
521
|
+
inputValue:
|
|
522
|
+
themeColor: INFO
|
|
523
|
+
iconSizeValue:
|
|
524
|
+
inputValue: 16
|
|
525
|
+
elevationValue:
|
|
526
|
+
inputValue: 0
|
|
527
|
+
unselectedChipStyle:
|
|
528
|
+
textStyle:
|
|
529
|
+
themeStyle: BODY_MEDIUM
|
|
530
|
+
colorValue:
|
|
531
|
+
inputValue:
|
|
532
|
+
value: "4286614942"
|
|
533
|
+
fontWeightValue:
|
|
534
|
+
inputValue: w600
|
|
535
|
+
labelPadding:
|
|
536
|
+
topValue:
|
|
537
|
+
inputValue: 4
|
|
538
|
+
rightValue:
|
|
539
|
+
inputValue: 10
|
|
540
|
+
bottomValue:
|
|
541
|
+
inputValue: 4
|
|
542
|
+
borderRadius:
|
|
543
|
+
type: FF_BORDER_RADIUS_ALL
|
|
544
|
+
allValue:
|
|
545
|
+
inputValue: 100
|
|
546
|
+
backgroundColorValue:
|
|
547
|
+
inputValue:
|
|
548
|
+
themeColor: SECONDARY_BACKGROUND
|
|
549
|
+
iconColorValue:
|
|
550
|
+
inputValue:
|
|
551
|
+
themeColor: SECONDARY_TEXT
|
|
552
|
+
iconSizeValue:
|
|
553
|
+
inputValue: 16
|
|
554
|
+
elevationValue:
|
|
555
|
+
inputValue: 0
|
|
556
|
+
borderColorValue:
|
|
557
|
+
inputValue:
|
|
558
|
+
value: "4291415247"
|
|
559
|
+
initialOption:
|
|
560
|
+
translationIdentifier:
|
|
561
|
+
key: n47l1c3n
|
|
562
|
+
textValue:
|
|
563
|
+
variable:
|
|
564
|
+
source: LOCAL_STATE
|
|
565
|
+
baseVariable:
|
|
566
|
+
localState:
|
|
567
|
+
fieldIdentifier:
|
|
568
|
+
name: TypeFilter
|
|
569
|
+
key: uudqi8wd
|
|
570
|
+
stateVariableType: APP_STATE
|
|
571
|
+
mostRecentInputValue: Nearby
|
|
572
|
+
childAlignment: wrap_start
|
|
573
|
+
chipSpacingValue:
|
|
574
|
+
inputValue: 8
|
|
575
|
+
rowSpacingValue:
|
|
576
|
+
inputValue: 8
|
|
577
|
+
wrappedValue:
|
|
578
|
+
inputValue: false
|
|
579
|
+
```
|