@lowdefy/docs-content 0.0.0-experimental-20260710073520

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.
Files changed (304) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +20 -0
  3. package/content/actions/callapi.md +66 -0
  4. package/content/actions/callmethod.md +41 -0
  5. package/content/actions/copytoclipboard.md +32 -0
  6. package/content/actions/displaymessage.md +53 -0
  7. package/content/actions/downloadcsv.md +89 -0
  8. package/content/actions/fetch.md +50 -0
  9. package/content/actions/geolocationcurrentposition.md +56 -0
  10. package/content/actions/link.md +104 -0
  11. package/content/actions/login.md +85 -0
  12. package/content/actions/logout.md +56 -0
  13. package/content/actions/pdfmake.md +304 -0
  14. package/content/actions/request.md +67 -0
  15. package/content/actions/reset.md +27 -0
  16. package/content/actions/resetvalidation.md +85 -0
  17. package/content/actions/scrollto.md +85 -0
  18. package/content/actions/setdarkmode.md +62 -0
  19. package/content/actions/setfocus.md +33 -0
  20. package/content/actions/setglobal.md +63 -0
  21. package/content/actions/setlocale.md +69 -0
  22. package/content/actions/setstate.md +70 -0
  23. package/content/actions/throw.md +72 -0
  24. package/content/actions/validate.md +87 -0
  25. package/content/actions/wait.md +24 -0
  26. package/content/agents/agent-endpoint-tools.md +190 -0
  27. package/content/agents/agent-mcp-tools.md +124 -0
  28. package/content/agents/agent-multi-agent.md +136 -0
  29. package/content/agents/agent-properties.md +174 -0
  30. package/content/agents/agent-server-hooks.md +336 -0
  31. package/content/agents/agentchat.md +515 -0
  32. package/content/agents/agentconversations.md +148 -0
  33. package/content/concepts/ai-agent-docs.md +190 -0
  34. package/content/concepts/cli.md +213 -0
  35. package/content/concepts/connections-and-requests.md +7 -0
  36. package/content/concepts/custom-html.md +3 -0
  37. package/content/concepts/custom-styling.md +161 -0
  38. package/content/concepts/events-and-actions.md +271 -0
  39. package/content/concepts/hosting-files.md +18 -0
  40. package/content/concepts/i18n.md +320 -0
  41. package/content/concepts/keyboard-shortcuts.md +218 -0
  42. package/content/concepts/layout-overview.md +478 -0
  43. package/content/concepts/lists.md +144 -0
  44. package/content/concepts/logger.md +43 -0
  45. package/content/concepts/lowdefy-schema.md +365 -0
  46. package/content/concepts/menus.md +144 -0
  47. package/content/concepts/module-authoring.md +564 -0
  48. package/content/concepts/modules.md +338 -0
  49. package/content/concepts/operators.md +45 -0
  50. package/content/concepts/overview.md +19 -0
  51. package/content/concepts/references-and-templates.md +207 -0
  52. package/content/concepts/secrets.md +24 -0
  53. package/content/concepts/selectors.md +143 -0
  54. package/content/connections/amazonredshift.md +176 -0
  55. package/content/connections/anthropic.md +232 -0
  56. package/content/connections/awss3.md +313 -0
  57. package/content/connections/azureblobstorage.md +133 -0
  58. package/content/connections/elasticsearch.md +371 -0
  59. package/content/connections/google.md +228 -0
  60. package/content/connections/googlecloudstorage.md +139 -0
  61. package/content/connections/googlesheet.md +313 -0
  62. package/content/connections/knex.md +206 -0
  63. package/content/connections/mariadb.md +177 -0
  64. package/content/connections/mcp.md +134 -0
  65. package/content/connections/mongodb.md +739 -0
  66. package/content/connections/mssql.md +191 -0
  67. package/content/connections/mysql.md +192 -0
  68. package/content/connections/openai-connection.md +228 -0
  69. package/content/connections/postgresql.md +200 -0
  70. package/content/connections/redis.md +116 -0
  71. package/content/connections/sendgridmail.md +94 -0
  72. package/content/connections/smtp.md +149 -0
  73. package/content/connections/sqlite.md +187 -0
  74. package/content/connections/stripe.md +115 -0
  75. package/content/container-blocks/affix.md +413 -0
  76. package/content/container-blocks/alert.md +937 -0
  77. package/content/container-blocks/badge.md +1222 -0
  78. package/content/container-blocks/box.md +1453 -0
  79. package/content/container-blocks/card.md +1200 -0
  80. package/content/container-blocks/carousel.md +2247 -0
  81. package/content/container-blocks/collapse.md +1335 -0
  82. package/content/container-blocks/configprovider.md +1070 -0
  83. package/content/container-blocks/confirmmodal.md +1159 -0
  84. package/content/container-blocks/content.md +597 -0
  85. package/content/container-blocks/descriptions.md +870 -0
  86. package/content/container-blocks/drawer.md +1379 -0
  87. package/content/container-blocks/dropdownmenu.md +643 -0
  88. package/content/container-blocks/flex.md +1510 -0
  89. package/content/container-blocks/footer.md +380 -0
  90. package/content/container-blocks/googlemaps.md +546 -0
  91. package/content/container-blocks/googlemapsheatmap.md +607 -0
  92. package/content/container-blocks/googlemapsscript.md +61 -0
  93. package/content/container-blocks/header.md +302 -0
  94. package/content/container-blocks/label.md +739 -0
  95. package/content/container-blocks/layout.md +604 -0
  96. package/content/container-blocks/masonry.md +1090 -0
  97. package/content/container-blocks/mobilemenu.md +1244 -0
  98. package/content/container-blocks/modal.md +1180 -0
  99. package/content/container-blocks/pageheadermenu.md +614 -0
  100. package/content/container-blocks/pagesidebarlayout.md +438 -0
  101. package/content/container-blocks/pagesidermenu.md +651 -0
  102. package/content/container-blocks/popover.md +1421 -0
  103. package/content/container-blocks/result.md +972 -0
  104. package/content/container-blocks/sider.md +1064 -0
  105. package/content/container-blocks/span.md +747 -0
  106. package/content/container-blocks/spinner.md +267 -0
  107. package/content/container-blocks/splitter.md +1735 -0
  108. package/content/container-blocks/tabs.md +1718 -0
  109. package/content/container-blocks/tooltip.md +1274 -0
  110. package/content/container-blocks/watermark.md +515 -0
  111. package/content/controls/for.md +103 -0
  112. package/content/controls/if.md +107 -0
  113. package/content/controls/log.md +50 -0
  114. package/content/controls/parallel.md +71 -0
  115. package/content/controls/parallel_for.md +36 -0
  116. package/content/controls/reject.md +56 -0
  117. package/content/controls/return.md +66 -0
  118. package/content/controls/set_state.md +98 -0
  119. package/content/controls/switch.md +90 -0
  120. package/content/controls/throw.md +79 -0
  121. package/content/controls/try.md +88 -0
  122. package/content/deployment/docker.md +149 -0
  123. package/content/deployment/node-server.md +27 -0
  124. package/content/deployment/vercel.md +101 -0
  125. package/content/display-blocks/aggrid.md +1459 -0
  126. package/content/display-blocks/anchor.md +336 -0
  127. package/content/display-blocks/avatar.md +1154 -0
  128. package/content/display-blocks/breadcrumb.md +517 -0
  129. package/content/display-blocks/button.md +758 -0
  130. package/content/display-blocks/calendar.md +156 -0
  131. package/content/display-blocks/dangeroushtml.md +314 -0
  132. package/content/display-blocks/dangerousmarkdown.md +423 -0
  133. package/content/display-blocks/diffgit.md +44 -0
  134. package/content/display-blocks/difflist.md +225 -0
  135. package/content/display-blocks/diffsidebyside.md +56 -0
  136. package/content/display-blocks/difftimeline.md +94 -0
  137. package/content/display-blocks/divider.md +406 -0
  138. package/content/display-blocks/download.md +60 -0
  139. package/content/display-blocks/dropdownbutton.md +661 -0
  140. package/content/display-blocks/echart.md +418 -0
  141. package/content/display-blocks/floatbutton.md +545 -0
  142. package/content/display-blocks/html.md +311 -0
  143. package/content/display-blocks/icon.md +717 -0
  144. package/content/display-blocks/img.md +479 -0
  145. package/content/display-blocks/markdown.md +520 -0
  146. package/content/display-blocks/markdownwithcode.md +730 -0
  147. package/content/display-blocks/menu.md +1123 -0
  148. package/content/display-blocks/message.md +941 -0
  149. package/content/display-blocks/notification.md +1410 -0
  150. package/content/display-blocks/paragraph.md +643 -0
  151. package/content/display-blocks/progress.md +818 -0
  152. package/content/display-blocks/qrcode.md +519 -0
  153. package/content/display-blocks/s3download.md +240 -0
  154. package/content/display-blocks/search.md +360 -0
  155. package/content/display-blocks/skeleton.md +272 -0
  156. package/content/display-blocks/skeletonavatar.md +222 -0
  157. package/content/display-blocks/skeletonbutton.md +245 -0
  158. package/content/display-blocks/skeletoninput.md +223 -0
  159. package/content/display-blocks/skeletonparagraph.md +201 -0
  160. package/content/display-blocks/statistic.md +485 -0
  161. package/content/display-blocks/steps.md +585 -0
  162. package/content/display-blocks/tag.md +620 -0
  163. package/content/display-blocks/title.md +654 -0
  164. package/content/display-blocks/tour.md +2359 -0
  165. package/content/input-blocks/autocomplete.md +786 -0
  166. package/content/input-blocks/buttonselector.md +964 -0
  167. package/content/input-blocks/checkboxselector.md +765 -0
  168. package/content/input-blocks/checkboxswitch.md +497 -0
  169. package/content/input-blocks/colorselector.md +884 -0
  170. package/content/input-blocks/daterangeselector.md +777 -0
  171. package/content/input-blocks/dateselector.md +693 -0
  172. package/content/input-blocks/datetimeselector.md +791 -0
  173. package/content/input-blocks/inputgallery.md +528 -0
  174. package/content/input-blocks/monthselector.md +717 -0
  175. package/content/input-blocks/multipleselector.md +1337 -0
  176. package/content/input-blocks/numberinput.md +855 -0
  177. package/content/input-blocks/pagination.md +679 -0
  178. package/content/input-blocks/paragraphinput.md +1664 -0
  179. package/content/input-blocks/passwordinput.md +480 -0
  180. package/content/input-blocks/phonenumberinput.md +688 -0
  181. package/content/input-blocks/radioselector.md +820 -0
  182. package/content/input-blocks/ratingslider.md +684 -0
  183. package/content/input-blocks/s3uploadbutton.md +384 -0
  184. package/content/input-blocks/s3uploaddragger.md +305 -0
  185. package/content/input-blocks/s3uploadphoto.md +288 -0
  186. package/content/input-blocks/segmentedselector.md +782 -0
  187. package/content/input-blocks/selector.md +1162 -0
  188. package/content/input-blocks/switch.md +552 -0
  189. package/content/input-blocks/textarea.md +714 -0
  190. package/content/input-blocks/textinput.md +639 -0
  191. package/content/input-blocks/tiptapinput.md +226 -0
  192. package/content/input-blocks/tiptapmentioninput.md +471 -0
  193. package/content/input-blocks/titleinput.md +1094 -0
  194. package/content/input-blocks/treeinput.md +144 -0
  195. package/content/input-blocks/treemultipleselector.md +162 -0
  196. package/content/input-blocks/treeselector.md +185 -0
  197. package/content/input-blocks/upload.md +149 -0
  198. package/content/input-blocks/uploaddragger.md +85 -0
  199. package/content/input-blocks/uploadphoto.md +84 -0
  200. package/content/input-blocks/weekselector.md +630 -0
  201. package/content/list-blocks/controlledlist.md +498 -0
  202. package/content/list-blocks/list.md +529 -0
  203. package/content/list-blocks/listselector.md +301 -0
  204. package/content/list-blocks/masonrylist.md +230 -0
  205. package/content/migration/upgrade-guide.md +106 -0
  206. package/content/migration/v4-to-v5.md +589 -0
  207. package/content/migration/v5-to-v6.md +36 -0
  208. package/content/operators/_actions.md +58 -0
  209. package/content/operators/_and.md +76 -0
  210. package/content/operators/_api.md +254 -0
  211. package/content/operators/_app.md +114 -0
  212. package/content/operators/_args.md +65 -0
  213. package/content/operators/_array.md +331 -0
  214. package/content/operators/_base64.md +49 -0
  215. package/content/operators/_boolean.md +33 -0
  216. package/content/operators/_build.md +166 -0
  217. package/content/operators/_change_case.md +357 -0
  218. package/content/operators/_date.md +415 -0
  219. package/content/operators/_dayjs.md +128 -0
  220. package/content/operators/_diff.md +61 -0
  221. package/content/operators/_divide.md +32 -0
  222. package/content/operators/_eq.md +52 -0
  223. package/content/operators/_event.md +86 -0
  224. package/content/operators/_function.md +52 -0
  225. package/content/operators/_get.md +92 -0
  226. package/content/operators/_global.md +86 -0
  227. package/content/operators/_gt.md +50 -0
  228. package/content/operators/_gte.md +50 -0
  229. package/content/operators/_hash.md +112 -0
  230. package/content/operators/_if.md +30 -0
  231. package/content/operators/_if_none.md +47 -0
  232. package/content/operators/_index.md +48 -0
  233. package/content/operators/_input.md +86 -0
  234. package/content/operators/_intl.md +135 -0
  235. package/content/operators/_item.md +166 -0
  236. package/content/operators/_js.md +113 -0
  237. package/content/operators/_json.md +120 -0
  238. package/content/operators/_jsonata.md +152 -0
  239. package/content/operators/_locale.md +65 -0
  240. package/content/operators/_location.md +40 -0
  241. package/content/operators/_log.md +22 -0
  242. package/content/operators/_lt.md +50 -0
  243. package/content/operators/_lte.md +50 -0
  244. package/content/operators/_math.md +407 -0
  245. package/content/operators/_media.md +83 -0
  246. package/content/operators/_menu.md +62 -0
  247. package/content/operators/_module.md +340 -0
  248. package/content/operators/_mql.md +95 -0
  249. package/content/operators/_ne.md +62 -0
  250. package/content/operators/_not.md +33 -0
  251. package/content/operators/_number.md +159 -0
  252. package/content/operators/_nunjucks.md +117 -0
  253. package/content/operators/_object.md +253 -0
  254. package/content/operators/_operator.md +33 -0
  255. package/content/operators/_or.md +67 -0
  256. package/content/operators/_product.md +45 -0
  257. package/content/operators/_random.md +90 -0
  258. package/content/operators/_ref.md +80 -0
  259. package/content/operators/_regex.md +69 -0
  260. package/content/operators/_request.md +35 -0
  261. package/content/operators/_request_details.md +29 -0
  262. package/content/operators/_secret.md +56 -0
  263. package/content/operators/_state.md +134 -0
  264. package/content/operators/_step.md +98 -0
  265. package/content/operators/_string.md +327 -0
  266. package/content/operators/_subtract.md +24 -0
  267. package/content/operators/_sum.md +45 -0
  268. package/content/operators/_switch.md +37 -0
  269. package/content/operators/_t.md +96 -0
  270. package/content/operators/_theme.md +65 -0
  271. package/content/operators/_type.md +78 -0
  272. package/content/operators/_uri.md +49 -0
  273. package/content/operators/_url_query.md +92 -0
  274. package/content/operators/_user.md +154 -0
  275. package/content/operators/_uuid.md +118 -0
  276. package/content/operators/_var.md +88 -0
  277. package/content/operators/_yaml.md +96 -0
  278. package/content/other/introduction.md +39 -0
  279. package/content/other/next-auth-providers.md +3 -0
  280. package/content/other/updatesession.md +26 -0
  281. package/content/plugins/plugins-actions.md +80 -0
  282. package/content/plugins/plugins-connections.md +98 -0
  283. package/content/plugins/plugins-dev.md +138 -0
  284. package/content/plugins/plugins-introduction.md +29 -0
  285. package/content/plugins/plugins-operators.md +71 -0
  286. package/content/testing/e2e-auth.md +108 -0
  287. package/content/testing/e2e-configuration.md +107 -0
  288. package/content/testing/e2e-getting-started.md +96 -0
  289. package/content/testing/e2e-introduction.md +53 -0
  290. package/content/testing/e2e-mocking.md +155 -0
  291. package/content/testing/e2e-writing-tests.md +214 -0
  292. package/content/tutorial/tutorial-actions-operators.md +222 -0
  293. package/content/tutorial/tutorial-add-blocks.md +86 -0
  294. package/content/tutorial/tutorial-create-page.md +57 -0
  295. package/content/tutorial/tutorial-display-data-page.md +181 -0
  296. package/content/tutorial/tutorial-next-steps.md +53 -0
  297. package/content/tutorial/tutorial-requests-sql.md +22 -0
  298. package/content/tutorial/tutorial-start.md +71 -0
  299. package/content/user-authentication/auth-providers.md +15 -0
  300. package/content/user-authentication/login-and-logout.md +122 -0
  301. package/content/user-authentication/users-introduction.md +31 -0
  302. package/index.json +2281 -0
  303. package/package.json +34 -0
  304. package/scripts/extractAgentDocs.js +130 -0
@@ -0,0 +1,552 @@
1
+ # Switch
2
+
3
+ Toggle switch with optional text and icon labels.
4
+
5
+ ```yaml
6
+ - id: basic_default
7
+ type: Switch
8
+ properties:
9
+ title: Default Switch
10
+ label:
11
+ disabled: true
12
+ - id: basic_small
13
+ type: Switch
14
+ properties:
15
+ title: Small Size
16
+ size: small
17
+ label:
18
+ disabled: true
19
+ - id: basic_autofocus
20
+ type: Switch
21
+ properties:
22
+ title: AutoFocus Switch
23
+ autoFocus: true
24
+ label:
25
+ disabled: true
26
+ ```
27
+
28
+ ```yaml
29
+ - id: text_on_off
30
+ type: Switch
31
+ properties:
32
+ title: On / Off
33
+ checkedText: ON
34
+ uncheckedText: OFF
35
+ label:
36
+ disabled: true
37
+ - id: text_yes_no
38
+ type: Switch
39
+ properties:
40
+ title: Yes / No
41
+ checkedText: Yes
42
+ uncheckedText: No
43
+ label:
44
+ disabled: true
45
+ - id: text_long
46
+ type: Switch
47
+ properties:
48
+ title: Longer Labels
49
+ checkedText: Enabled
50
+ uncheckedText: Disabled
51
+ label:
52
+ disabled: true
53
+ - id: text_numbers
54
+ type: Switch
55
+ properties:
56
+ title: Numeric Labels
57
+ checkedText: "1"
58
+ uncheckedText: "0"
59
+ label:
60
+ disabled: true
61
+ - id: text_small_on_off
62
+ type: Switch
63
+ properties:
64
+ title: Small with Text
65
+ checkedText: ON
66
+ uncheckedText: OFF
67
+ size: small
68
+ label:
69
+ disabled: true
70
+ ```
71
+
72
+ ```yaml
73
+ - id: icon_custom_check
74
+ type: Switch
75
+ properties:
76
+ title: Custom Checked Icon
77
+ checkedIcon: AiOutlineLike
78
+ uncheckedIcon: AiOutlineDislike
79
+ label:
80
+ disabled: true
81
+ - id: icon_lock
82
+ type: Switch
83
+ properties:
84
+ title: Lock / Unlock
85
+ checkedIcon: AiOutlineLock
86
+ uncheckedIcon: AiOutlineUnlock
87
+ label:
88
+ disabled: true
89
+ - id: icon_sound
90
+ type: Switch
91
+ properties:
92
+ title: Sound On / Off
93
+ checkedIcon: AiOutlineSound
94
+ uncheckedIcon:
95
+ name: AiOutlineStop
96
+ color: "#999"
97
+ label:
98
+ disabled: true
99
+ - id: icon_visibility
100
+ type: Switch
101
+ properties:
102
+ title: Visibility Toggle
103
+ checkedIcon: AiOutlineEye
104
+ uncheckedIcon: AiOutlineEyeInvisible
105
+ label:
106
+ disabled: true
107
+ - id: icon_power
108
+ type: Switch
109
+ properties:
110
+ title: Power Toggle
111
+ checkedIcon: AiOutlineThunderbolt
112
+ uncheckedIcon: AiOutlinePoweroff
113
+ label:
114
+ disabled: true
115
+ ```
116
+
117
+ ```yaml
118
+ - id: color_green
119
+ type: Switch
120
+ properties:
121
+ title: Green
122
+ color: "#52c41a"
123
+ label:
124
+ disabled: true
125
+ - id: color_orange
126
+ type: Switch
127
+ properties:
128
+ title: Orange
129
+ color: "#fa8c16"
130
+ label:
131
+ disabled: true
132
+ - id: color_purple
133
+ type: Switch
134
+ properties:
135
+ title: Purple
136
+ color: "#722ed1"
137
+ label:
138
+ disabled: true
139
+ - id: color_red
140
+ type: Switch
141
+ properties:
142
+ title: Red
143
+ color: "#f5222d"
144
+ label:
145
+ disabled: true
146
+ - id: color_cyan
147
+ type: Switch
148
+ properties:
149
+ title: Cyan
150
+ color: "#13c2c2"
151
+ label:
152
+ disabled: true
153
+ ```
154
+
155
+ ```yaml
156
+ - id: color_text_green
157
+ type: Switch
158
+ properties:
159
+ title: Active / Inactive
160
+ color: "#52c41a"
161
+ checkedText: Active
162
+ uncheckedText: Inactive
163
+ label:
164
+ disabled: true
165
+ - id: color_text_red
166
+ type: Switch
167
+ properties:
168
+ title: Allow / Deny
169
+ color: "#f5222d"
170
+ checkedText: Allow
171
+ uncheckedText: Deny
172
+ label:
173
+ disabled: true
174
+ - id: color_text_purple
175
+ type: Switch
176
+ properties:
177
+ title: Public / Private
178
+ color: "#722ed1"
179
+ checkedText: Public
180
+ uncheckedText: Private
181
+ label:
182
+ disabled: true
183
+ ```
184
+
185
+ ```yaml
186
+ - id: disabled_off
187
+ type: Switch
188
+ properties:
189
+ title: Disabled (Off)
190
+ disabled: true
191
+ label:
192
+ disabled: true
193
+ - id: disabled_text
194
+ type: Switch
195
+ properties:
196
+ title: Disabled with Text
197
+ disabled: true
198
+ checkedText: ON
199
+ uncheckedText: OFF
200
+ label:
201
+ disabled: true
202
+ - id: disabled_small
203
+ type: Switch
204
+ properties:
205
+ title: Disabled Small
206
+ disabled: true
207
+ size: small
208
+ label:
209
+ disabled: true
210
+ - id: disabled_color
211
+ type: Switch
212
+ properties:
213
+ title: Disabled with Color
214
+ disabled: true
215
+ color: "#52c41a"
216
+ label:
217
+ disabled: true
218
+ - id: disabled_icons
219
+ type: Switch
220
+ properties:
221
+ title: Disabled with Icons
222
+ disabled: true
223
+ checkedIcon: AiOutlineLike
224
+ uncheckedIcon: AiOutlineDislike
225
+ label:
226
+ disabled: true
227
+ ```
228
+
229
+ ```yaml
230
+ - id: label_default
231
+ type: Switch
232
+ properties:
233
+ title: Enable notifications
234
+ - id: label_extra
235
+ type: Switch
236
+ properties:
237
+ title: Notifications
238
+ label:
239
+ extra: Enable push notifications on this device.
240
+ - id: label_no_colon
241
+ type: Switch
242
+ properties:
243
+ title: Status
244
+ label:
245
+ colon: false
246
+ - id: label_hidden
247
+ type: Switch
248
+ properties:
249
+ title: Hidden Label
250
+ label:
251
+ disabled: true
252
+ - id: label_feedback
253
+ type: Switch
254
+ properties:
255
+ title: With Feedback
256
+ label:
257
+ hasFeedback: true
258
+ ```
259
+
260
+ ```yaml
261
+ - id: label_inline
262
+ type: Switch
263
+ properties:
264
+ title: Dark mode
265
+ label:
266
+ inline: true
267
+ span: 8
268
+ - id: label_inline_right
269
+ type: Switch
270
+ properties:
271
+ title: Auto-save
272
+ label:
273
+ inline: true
274
+ span: 8
275
+ align: right
276
+ - id: label_inline_small
277
+ type: Switch
278
+ properties:
279
+ title: Compact mode
280
+ size: small
281
+ label:
282
+ inline: true
283
+ span: 8
284
+ ```
285
+
286
+ ```yaml
287
+ - id: style_margin
288
+ type: Switch
289
+ style:
290
+ .element:
291
+ marginTop: 8
292
+ properties:
293
+ title: Styled Element
294
+ label:
295
+ disabled: true
296
+ - id: style_label
297
+ type: Switch
298
+ style:
299
+ .label:
300
+ fontWeight: bold
301
+ color: "#1677ff"
302
+ properties:
303
+ title: Styled Label
304
+ - id: class_tailwind
305
+ type: Switch
306
+ class: p-2 border border-border rounded
307
+ properties:
308
+ title: Tailwind Classes
309
+ label:
310
+ disabled: true
311
+ ```
312
+
313
+ ```yaml
314
+ - id: theme_large_track
315
+ type: Switch
316
+ properties:
317
+ title: Large Track
318
+ checkedText: ON
319
+ uncheckedText: OFF
320
+ label:
321
+ disabled: true
322
+ theme:
323
+ trackHeight: 30
324
+ trackMinWidth: 60
325
+ handleSize: 26
326
+ - id: theme_small_track
327
+ type: Switch
328
+ properties:
329
+ title: Tiny Track
330
+ size: small
331
+ label:
332
+ disabled: true
333
+ theme:
334
+ trackHeightSM: 12
335
+ trackMinWidthSM: 20
336
+ handleSizeSM: 8
337
+ - id: theme_no_shadow
338
+ type: Switch
339
+ properties:
340
+ title: No Handle Shadow
341
+ label:
342
+ disabled: true
343
+ theme:
344
+ handleShadow: 0 0 0 0 transparent
345
+ - id: theme_colored_handle
346
+ type: Switch
347
+ properties:
348
+ title: Colored Handle
349
+ label:
350
+ disabled: true
351
+ - id: theme_primary_color
352
+ type: Switch
353
+ properties:
354
+ title: Custom Primary Color
355
+ label:
356
+ disabled: true
357
+ theme:
358
+ colorPrimary: "#eb2f96"
359
+ colorPrimaryHover: "#f759ab"
360
+ ```
361
+
362
+ ```yaml
363
+ - id: comp_settings_card
364
+ type: Card
365
+ properties:
366
+ title: Settings
367
+ size: small
368
+ blocks:
369
+ - id: comp_notifications
370
+ type: Switch
371
+ properties:
372
+ title: Notifications
373
+ label:
374
+ inline: true
375
+ span: 16
376
+ events:
377
+ onChange:
378
+ - id: comp_notifications_action
379
+ type: SetState
380
+ params:
381
+ notifications_enabled:
382
+ _state: comp_notifications
383
+ - id: comp_auto_update
384
+ type: Switch
385
+ properties:
386
+ title: Auto-update
387
+ label:
388
+ inline: true
389
+ span: 16
390
+ events:
391
+ onChange:
392
+ - id: comp_auto_update_action
393
+ type: SetState
394
+ params:
395
+ auto_update_enabled:
396
+ _state: comp_auto_update
397
+ - id: comp_dark_mode
398
+ type: Switch
399
+ properties:
400
+ title: Dark mode
401
+ label:
402
+ inline: true
403
+ span: 16
404
+ events:
405
+ onChange:
406
+ - id: comp_dark_mode_action
407
+ type: DisplayMessage
408
+ params:
409
+ content: Dark mode toggled.
410
+ duration: 2
411
+ - id: comp_analytics
412
+ type: Switch
413
+ properties:
414
+ title: Analytics
415
+ label:
416
+ inline: true
417
+ span: 16
418
+ extra: Allow anonymous usage data collection.
419
+ events:
420
+ onChange:
421
+ - id: comp_analytics_action
422
+ type: SetState
423
+ params:
424
+ analytics_enabled:
425
+ _state: comp_analytics
426
+ ```
427
+
428
+ ```yaml
429
+ - id: applied2_privacy_card
430
+ type: Card
431
+ properties:
432
+ title: Privacy Settings
433
+ blocks:
434
+ - id: applied2_privacy_profile_visible
435
+ type: Switch
436
+ properties:
437
+ title: Public Profile
438
+ checkedText: Visible
439
+ uncheckedText: Hidden
440
+ color: "#1677ff"
441
+ label:
442
+ inline: true
443
+ span: 16
444
+ extra: Allow other users to view your profile.
445
+ - id: applied2_privacy_activity_status
446
+ type: Switch
447
+ properties:
448
+ title: Activity Status
449
+ checkedText: ON
450
+ uncheckedText: OFF
451
+ color: "#52c41a"
452
+ label:
453
+ inline: true
454
+ span: 16
455
+ extra: Show when you are online.
456
+ - id: applied2_privacy_search_indexing
457
+ type: Switch
458
+ properties:
459
+ title: Search Engine Indexing
460
+ checkedText: Allow
461
+ uncheckedText: Block
462
+ color: "#fa8c16"
463
+ label:
464
+ inline: true
465
+ span: 16
466
+ extra: Allow search engines to index your profile.
467
+ - id: applied2_privacy_data_sharing
468
+ type: Switch
469
+ properties:
470
+ title: Data Sharing
471
+ checkedText: Yes
472
+ uncheckedText: No
473
+ color: "#722ed1"
474
+ label:
475
+ inline: true
476
+ span: 16
477
+ extra: Share anonymous usage data to help improve the service.
478
+ - id: applied2_privacy_save_btn
479
+ type: Button
480
+ properties:
481
+ title: Save Privacy Settings
482
+ icon: AiOutlineSave
483
+ type: primary
484
+ block: true
485
+ events:
486
+ onClick:
487
+ - id: save_privacy_action
488
+ type: DisplayMessage
489
+ params:
490
+ content: Privacy settings updated successfully.
491
+ duration: 3
492
+ ```
493
+
494
+ | Property | Type | Default | Description |
495
+ | --- | --- | --- | --- |
496
+ | `autoFocus` | boolean | `false` | Autofocus to the block on page load. |
497
+ | `checkedIcon` | string \| object | `"AiOutlineCheck"` | Name of an React-Icon (See all icons) or properties of an Icon block to customize icon to shown when switch is checked (true). |
498
+ | `checkedText` | string | - | Text to shown when switch is checked (true). |
499
+ | `color` | string | - | Switch checked color. |
500
+ | `disabled` | boolean | `false` | Disable the block if true. |
501
+ | `label` | object | - | Label properties. |
502
+ | `label.align` | string | `"left"` | Align label left or right when inline. Enum: `left`, `right`. |
503
+ | `label.colon` | boolean | `true` | Append label with colon. |
504
+ | `label.extra` | string | - | Extra text to display beneath the content - supports html. |
505
+ | `label.title` | string | - | Label title - supports html. |
506
+ | `label.tooltip` | string \| object | - | Help tooltip shown via an icon beside the label. A string sets the tooltip text (supports html), or an object to also customize the icon and color. Use the block's onTooltipClick event to respond to clicks on the icon. |
507
+ | `label.tooltip.title` | string | - | Tooltip text shown on hover - supports html. |
508
+ | `label.tooltip.icon` | string | `"AiOutlineQuestionCircle"` | Name of the icon to show beside the label. |
509
+ | `label.tooltip.color` | string | - | Color of the tooltip icon. |
510
+ | `label.span` | number | - | Label inline span. |
511
+ | `label.disabled` | boolean | `false` | Hide input label. |
512
+ | `label.hasFeedback` | boolean | `true` | Display feedback extra from validation, this does not disable validation. |
513
+ | `label.inline` | boolean | `false` | Render input and label inline. |
514
+ | `size` | string | `"default"` | Size of the block. Enum: `small`, `default`. |
515
+ | `title` | string | - | Title to describe the input component, if no title is specified the block id is displayed - supports html. |
516
+ | `uncheckedIcon` | string \| object | `"AiOutlineClose"` | Name of an React-Icon (See all icons) or properties of an Icon block to customize icon to shown when switch is unchecked (false). |
517
+ | `uncheckedText` | string | - | Text to shown when switch is not checked (false). |
518
+ | `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design switch tokens](https://ant.design/components/switch#design-token). |
519
+ | `theme.trackHeight` | number | `22` | Height of the switch track. |
520
+ | `theme.trackHeightSM` | number | `16` | Height of the switch track for small size. |
521
+ | `theme.trackMinWidth` | number | `44` | Minimum width of the switch track. |
522
+ | `theme.trackMinWidthSM` | number | `28` | Minimum width of the switch track for small size. |
523
+ | `theme.trackPadding` | number | `2` | Internal padding of the switch track. |
524
+ | `theme.handleBg` | string | `"#fff"` | Background color of the switch handle. |
525
+ | `theme.handleSize` | number | `18` | Diameter of the switch handle. |
526
+ | `theme.handleSizeSM` | number | `12` | Diameter of the switch handle for small size. |
527
+ | `theme.handleShadow` | string | `"0 2px 4px 0 rgba(0,35,11,0.2)"` | Box shadow of the switch handle. |
528
+ | `theme.innerMinMargin` | number | `9` | Minimum margin for inner content (text/icon) of the switch. |
529
+ | `theme.innerMaxMargin` | number | `24` | Maximum margin for inner content (text/icon) of the switch. |
530
+ | `theme.innerMinMarginSM` | number | `6` | Minimum margin for inner content for small size. |
531
+ | `theme.innerMaxMarginSM` | number | `18` | Maximum margin for inner content for small size. |
532
+ | `theme.colorPrimary` | string | - | Primary color when the switch is checked. |
533
+ | `theme.colorPrimaryHover` | string | - | Primary color on hover when the switch is checked. |
534
+ | `theme.colorTextQuaternary` | string | - | Background color when the switch is unchecked. |
535
+ | `theme.colorTextTertiary` | string | - | Background color on hover when the switch is unchecked. |
536
+
537
+ | Event | Event Data | Description |
538
+ | --- | --- | --- |
539
+ | `onChange` | `{ value }` | Trigger action when switch is changed. |
540
+ | `onTooltipClick` | \- | Trigger actions when the tooltip icon is clicked. |
541
+
542
+ | Key | Target |
543
+ | --- | --- |
544
+ | `/block` | Outer block wrapper (always available). |
545
+ | `/element` | The Switch element. |
546
+ | `/checkedIcon` | The checked icon in the Switch. |
547
+ | `/label` | The Switch label. |
548
+ | `/extra` | The Switch extra content. |
549
+ | `/feedback` | The Switch validation feedback. |
550
+ | `/uncheckedIcon` | The unchecked icon in the Switch. |
551
+
552
+ No slots defined.