@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.
- package/LICENSE +201 -0
- package/README.md +20 -0
- package/content/actions/callapi.md +66 -0
- package/content/actions/callmethod.md +41 -0
- package/content/actions/copytoclipboard.md +32 -0
- package/content/actions/displaymessage.md +53 -0
- package/content/actions/downloadcsv.md +89 -0
- package/content/actions/fetch.md +50 -0
- package/content/actions/geolocationcurrentposition.md +56 -0
- package/content/actions/link.md +104 -0
- package/content/actions/login.md +85 -0
- package/content/actions/logout.md +56 -0
- package/content/actions/pdfmake.md +304 -0
- package/content/actions/request.md +67 -0
- package/content/actions/reset.md +27 -0
- package/content/actions/resetvalidation.md +85 -0
- package/content/actions/scrollto.md +85 -0
- package/content/actions/setdarkmode.md +62 -0
- package/content/actions/setfocus.md +33 -0
- package/content/actions/setglobal.md +63 -0
- package/content/actions/setlocale.md +69 -0
- package/content/actions/setstate.md +70 -0
- package/content/actions/throw.md +72 -0
- package/content/actions/validate.md +87 -0
- package/content/actions/wait.md +24 -0
- package/content/agents/agent-endpoint-tools.md +190 -0
- package/content/agents/agent-mcp-tools.md +124 -0
- package/content/agents/agent-multi-agent.md +136 -0
- package/content/agents/agent-properties.md +174 -0
- package/content/agents/agent-server-hooks.md +336 -0
- package/content/agents/agentchat.md +515 -0
- package/content/agents/agentconversations.md +148 -0
- package/content/concepts/ai-agent-docs.md +190 -0
- package/content/concepts/cli.md +213 -0
- package/content/concepts/connections-and-requests.md +7 -0
- package/content/concepts/custom-html.md +3 -0
- package/content/concepts/custom-styling.md +161 -0
- package/content/concepts/events-and-actions.md +271 -0
- package/content/concepts/hosting-files.md +18 -0
- package/content/concepts/i18n.md +320 -0
- package/content/concepts/keyboard-shortcuts.md +218 -0
- package/content/concepts/layout-overview.md +478 -0
- package/content/concepts/lists.md +144 -0
- package/content/concepts/logger.md +43 -0
- package/content/concepts/lowdefy-schema.md +365 -0
- package/content/concepts/menus.md +144 -0
- package/content/concepts/module-authoring.md +564 -0
- package/content/concepts/modules.md +338 -0
- package/content/concepts/operators.md +45 -0
- package/content/concepts/overview.md +19 -0
- package/content/concepts/references-and-templates.md +207 -0
- package/content/concepts/secrets.md +24 -0
- package/content/concepts/selectors.md +143 -0
- package/content/connections/amazonredshift.md +176 -0
- package/content/connections/anthropic.md +232 -0
- package/content/connections/awss3.md +313 -0
- package/content/connections/azureblobstorage.md +133 -0
- package/content/connections/elasticsearch.md +371 -0
- package/content/connections/google.md +228 -0
- package/content/connections/googlecloudstorage.md +139 -0
- package/content/connections/googlesheet.md +313 -0
- package/content/connections/knex.md +206 -0
- package/content/connections/mariadb.md +177 -0
- package/content/connections/mcp.md +134 -0
- package/content/connections/mongodb.md +739 -0
- package/content/connections/mssql.md +191 -0
- package/content/connections/mysql.md +192 -0
- package/content/connections/openai-connection.md +228 -0
- package/content/connections/postgresql.md +200 -0
- package/content/connections/redis.md +116 -0
- package/content/connections/sendgridmail.md +94 -0
- package/content/connections/smtp.md +149 -0
- package/content/connections/sqlite.md +187 -0
- package/content/connections/stripe.md +115 -0
- package/content/container-blocks/affix.md +413 -0
- package/content/container-blocks/alert.md +937 -0
- package/content/container-blocks/badge.md +1222 -0
- package/content/container-blocks/box.md +1453 -0
- package/content/container-blocks/card.md +1200 -0
- package/content/container-blocks/carousel.md +2247 -0
- package/content/container-blocks/collapse.md +1335 -0
- package/content/container-blocks/configprovider.md +1070 -0
- package/content/container-blocks/confirmmodal.md +1159 -0
- package/content/container-blocks/content.md +597 -0
- package/content/container-blocks/descriptions.md +870 -0
- package/content/container-blocks/drawer.md +1379 -0
- package/content/container-blocks/dropdownmenu.md +643 -0
- package/content/container-blocks/flex.md +1510 -0
- package/content/container-blocks/footer.md +380 -0
- package/content/container-blocks/googlemaps.md +546 -0
- package/content/container-blocks/googlemapsheatmap.md +607 -0
- package/content/container-blocks/googlemapsscript.md +61 -0
- package/content/container-blocks/header.md +302 -0
- package/content/container-blocks/label.md +739 -0
- package/content/container-blocks/layout.md +604 -0
- package/content/container-blocks/masonry.md +1090 -0
- package/content/container-blocks/mobilemenu.md +1244 -0
- package/content/container-blocks/modal.md +1180 -0
- package/content/container-blocks/pageheadermenu.md +614 -0
- package/content/container-blocks/pagesidebarlayout.md +438 -0
- package/content/container-blocks/pagesidermenu.md +651 -0
- package/content/container-blocks/popover.md +1421 -0
- package/content/container-blocks/result.md +972 -0
- package/content/container-blocks/sider.md +1064 -0
- package/content/container-blocks/span.md +747 -0
- package/content/container-blocks/spinner.md +267 -0
- package/content/container-blocks/splitter.md +1735 -0
- package/content/container-blocks/tabs.md +1718 -0
- package/content/container-blocks/tooltip.md +1274 -0
- package/content/container-blocks/watermark.md +515 -0
- package/content/controls/for.md +103 -0
- package/content/controls/if.md +107 -0
- package/content/controls/log.md +50 -0
- package/content/controls/parallel.md +71 -0
- package/content/controls/parallel_for.md +36 -0
- package/content/controls/reject.md +56 -0
- package/content/controls/return.md +66 -0
- package/content/controls/set_state.md +98 -0
- package/content/controls/switch.md +90 -0
- package/content/controls/throw.md +79 -0
- package/content/controls/try.md +88 -0
- package/content/deployment/docker.md +149 -0
- package/content/deployment/node-server.md +27 -0
- package/content/deployment/vercel.md +101 -0
- package/content/display-blocks/aggrid.md +1459 -0
- package/content/display-blocks/anchor.md +336 -0
- package/content/display-blocks/avatar.md +1154 -0
- package/content/display-blocks/breadcrumb.md +517 -0
- package/content/display-blocks/button.md +758 -0
- package/content/display-blocks/calendar.md +156 -0
- package/content/display-blocks/dangeroushtml.md +314 -0
- package/content/display-blocks/dangerousmarkdown.md +423 -0
- package/content/display-blocks/diffgit.md +44 -0
- package/content/display-blocks/difflist.md +225 -0
- package/content/display-blocks/diffsidebyside.md +56 -0
- package/content/display-blocks/difftimeline.md +94 -0
- package/content/display-blocks/divider.md +406 -0
- package/content/display-blocks/download.md +60 -0
- package/content/display-blocks/dropdownbutton.md +661 -0
- package/content/display-blocks/echart.md +418 -0
- package/content/display-blocks/floatbutton.md +545 -0
- package/content/display-blocks/html.md +311 -0
- package/content/display-blocks/icon.md +717 -0
- package/content/display-blocks/img.md +479 -0
- package/content/display-blocks/markdown.md +520 -0
- package/content/display-blocks/markdownwithcode.md +730 -0
- package/content/display-blocks/menu.md +1123 -0
- package/content/display-blocks/message.md +941 -0
- package/content/display-blocks/notification.md +1410 -0
- package/content/display-blocks/paragraph.md +643 -0
- package/content/display-blocks/progress.md +818 -0
- package/content/display-blocks/qrcode.md +519 -0
- package/content/display-blocks/s3download.md +240 -0
- package/content/display-blocks/search.md +360 -0
- package/content/display-blocks/skeleton.md +272 -0
- package/content/display-blocks/skeletonavatar.md +222 -0
- package/content/display-blocks/skeletonbutton.md +245 -0
- package/content/display-blocks/skeletoninput.md +223 -0
- package/content/display-blocks/skeletonparagraph.md +201 -0
- package/content/display-blocks/statistic.md +485 -0
- package/content/display-blocks/steps.md +585 -0
- package/content/display-blocks/tag.md +620 -0
- package/content/display-blocks/title.md +654 -0
- package/content/display-blocks/tour.md +2359 -0
- package/content/input-blocks/autocomplete.md +786 -0
- package/content/input-blocks/buttonselector.md +964 -0
- package/content/input-blocks/checkboxselector.md +765 -0
- package/content/input-blocks/checkboxswitch.md +497 -0
- package/content/input-blocks/colorselector.md +884 -0
- package/content/input-blocks/daterangeselector.md +777 -0
- package/content/input-blocks/dateselector.md +693 -0
- package/content/input-blocks/datetimeselector.md +791 -0
- package/content/input-blocks/inputgallery.md +528 -0
- package/content/input-blocks/monthselector.md +717 -0
- package/content/input-blocks/multipleselector.md +1337 -0
- package/content/input-blocks/numberinput.md +855 -0
- package/content/input-blocks/pagination.md +679 -0
- package/content/input-blocks/paragraphinput.md +1664 -0
- package/content/input-blocks/passwordinput.md +480 -0
- package/content/input-blocks/phonenumberinput.md +688 -0
- package/content/input-blocks/radioselector.md +820 -0
- package/content/input-blocks/ratingslider.md +684 -0
- package/content/input-blocks/s3uploadbutton.md +384 -0
- package/content/input-blocks/s3uploaddragger.md +305 -0
- package/content/input-blocks/s3uploadphoto.md +288 -0
- package/content/input-blocks/segmentedselector.md +782 -0
- package/content/input-blocks/selector.md +1162 -0
- package/content/input-blocks/switch.md +552 -0
- package/content/input-blocks/textarea.md +714 -0
- package/content/input-blocks/textinput.md +639 -0
- package/content/input-blocks/tiptapinput.md +226 -0
- package/content/input-blocks/tiptapmentioninput.md +471 -0
- package/content/input-blocks/titleinput.md +1094 -0
- package/content/input-blocks/treeinput.md +144 -0
- package/content/input-blocks/treemultipleselector.md +162 -0
- package/content/input-blocks/treeselector.md +185 -0
- package/content/input-blocks/upload.md +149 -0
- package/content/input-blocks/uploaddragger.md +85 -0
- package/content/input-blocks/uploadphoto.md +84 -0
- package/content/input-blocks/weekselector.md +630 -0
- package/content/list-blocks/controlledlist.md +498 -0
- package/content/list-blocks/list.md +529 -0
- package/content/list-blocks/listselector.md +301 -0
- package/content/list-blocks/masonrylist.md +230 -0
- package/content/migration/upgrade-guide.md +106 -0
- package/content/migration/v4-to-v5.md +589 -0
- package/content/migration/v5-to-v6.md +36 -0
- package/content/operators/_actions.md +58 -0
- package/content/operators/_and.md +76 -0
- package/content/operators/_api.md +254 -0
- package/content/operators/_app.md +114 -0
- package/content/operators/_args.md +65 -0
- package/content/operators/_array.md +331 -0
- package/content/operators/_base64.md +49 -0
- package/content/operators/_boolean.md +33 -0
- package/content/operators/_build.md +166 -0
- package/content/operators/_change_case.md +357 -0
- package/content/operators/_date.md +415 -0
- package/content/operators/_dayjs.md +128 -0
- package/content/operators/_diff.md +61 -0
- package/content/operators/_divide.md +32 -0
- package/content/operators/_eq.md +52 -0
- package/content/operators/_event.md +86 -0
- package/content/operators/_function.md +52 -0
- package/content/operators/_get.md +92 -0
- package/content/operators/_global.md +86 -0
- package/content/operators/_gt.md +50 -0
- package/content/operators/_gte.md +50 -0
- package/content/operators/_hash.md +112 -0
- package/content/operators/_if.md +30 -0
- package/content/operators/_if_none.md +47 -0
- package/content/operators/_index.md +48 -0
- package/content/operators/_input.md +86 -0
- package/content/operators/_intl.md +135 -0
- package/content/operators/_item.md +166 -0
- package/content/operators/_js.md +113 -0
- package/content/operators/_json.md +120 -0
- package/content/operators/_jsonata.md +152 -0
- package/content/operators/_locale.md +65 -0
- package/content/operators/_location.md +40 -0
- package/content/operators/_log.md +22 -0
- package/content/operators/_lt.md +50 -0
- package/content/operators/_lte.md +50 -0
- package/content/operators/_math.md +407 -0
- package/content/operators/_media.md +83 -0
- package/content/operators/_menu.md +62 -0
- package/content/operators/_module.md +340 -0
- package/content/operators/_mql.md +95 -0
- package/content/operators/_ne.md +62 -0
- package/content/operators/_not.md +33 -0
- package/content/operators/_number.md +159 -0
- package/content/operators/_nunjucks.md +117 -0
- package/content/operators/_object.md +253 -0
- package/content/operators/_operator.md +33 -0
- package/content/operators/_or.md +67 -0
- package/content/operators/_product.md +45 -0
- package/content/operators/_random.md +90 -0
- package/content/operators/_ref.md +80 -0
- package/content/operators/_regex.md +69 -0
- package/content/operators/_request.md +35 -0
- package/content/operators/_request_details.md +29 -0
- package/content/operators/_secret.md +56 -0
- package/content/operators/_state.md +134 -0
- package/content/operators/_step.md +98 -0
- package/content/operators/_string.md +327 -0
- package/content/operators/_subtract.md +24 -0
- package/content/operators/_sum.md +45 -0
- package/content/operators/_switch.md +37 -0
- package/content/operators/_t.md +96 -0
- package/content/operators/_theme.md +65 -0
- package/content/operators/_type.md +78 -0
- package/content/operators/_uri.md +49 -0
- package/content/operators/_url_query.md +92 -0
- package/content/operators/_user.md +154 -0
- package/content/operators/_uuid.md +118 -0
- package/content/operators/_var.md +88 -0
- package/content/operators/_yaml.md +96 -0
- package/content/other/introduction.md +39 -0
- package/content/other/next-auth-providers.md +3 -0
- package/content/other/updatesession.md +26 -0
- package/content/plugins/plugins-actions.md +80 -0
- package/content/plugins/plugins-connections.md +98 -0
- package/content/plugins/plugins-dev.md +138 -0
- package/content/plugins/plugins-introduction.md +29 -0
- package/content/plugins/plugins-operators.md +71 -0
- package/content/testing/e2e-auth.md +108 -0
- package/content/testing/e2e-configuration.md +107 -0
- package/content/testing/e2e-getting-started.md +96 -0
- package/content/testing/e2e-introduction.md +53 -0
- package/content/testing/e2e-mocking.md +155 -0
- package/content/testing/e2e-writing-tests.md +214 -0
- package/content/tutorial/tutorial-actions-operators.md +222 -0
- package/content/tutorial/tutorial-add-blocks.md +86 -0
- package/content/tutorial/tutorial-create-page.md +57 -0
- package/content/tutorial/tutorial-display-data-page.md +181 -0
- package/content/tutorial/tutorial-next-steps.md +53 -0
- package/content/tutorial/tutorial-requests-sql.md +22 -0
- package/content/tutorial/tutorial-start.md +71 -0
- package/content/user-authentication/auth-providers.md +15 -0
- package/content/user-authentication/login-and-logout.md +122 -0
- package/content/user-authentication/users-introduction.md +31 -0
- package/index.json +2281 -0
- package/package.json +34 -0
- package/scripts/extractAgentDocs.js +130 -0
|
@@ -0,0 +1,1180 @@
|
|
|
1
|
+
# Modal
|
|
2
|
+
|
|
3
|
+
Modal dialog overlay for focused content. Add `shortcut: Escape` to the `onClose` event to run custom actions when Escape is pressed. Ant Design's Modal already closes on Escape by default — the shortcut triggers your custom actions in addition to the built-in close.
|
|
4
|
+
|
|
5
|
+
This is a basic modal dialog with a title, content area, and default Ok/Cancel buttons.
|
|
6
|
+
|
|
7
|
+
Click Ok to confirm or Cancel to dismiss.
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
- id: modal_basic_trigger
|
|
11
|
+
type: Button
|
|
12
|
+
layout:
|
|
13
|
+
flex: 0 0 auto
|
|
14
|
+
properties:
|
|
15
|
+
title: Open Modal
|
|
16
|
+
color: primary
|
|
17
|
+
variant: solid
|
|
18
|
+
events:
|
|
19
|
+
onClick:
|
|
20
|
+
- id: modal_basic_open
|
|
21
|
+
type: CallMethod
|
|
22
|
+
params:
|
|
23
|
+
blockId: modal_basic
|
|
24
|
+
method: setOpen
|
|
25
|
+
args:
|
|
26
|
+
- open: true
|
|
27
|
+
- id: modal_basic
|
|
28
|
+
type: Modal
|
|
29
|
+
properties:
|
|
30
|
+
title: Basic Modal
|
|
31
|
+
blocks:
|
|
32
|
+
- id: modal_basic_p1
|
|
33
|
+
type: Paragraph
|
|
34
|
+
properties:
|
|
35
|
+
content: This is a basic modal dialog with a title, content area, and default
|
|
36
|
+
Ok/Cancel buttons.
|
|
37
|
+
- id: modal_basic_p2
|
|
38
|
+
type: Paragraph
|
|
39
|
+
properties:
|
|
40
|
+
content: Click Ok to confirm or Cancel to dismiss.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The modal title supports HTML markup for rich text formatting.
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
- id: modal_html_title_trigger
|
|
47
|
+
type: Button
|
|
48
|
+
layout:
|
|
49
|
+
flex: 0 0 auto
|
|
50
|
+
properties:
|
|
51
|
+
title: Open Modal with HTML Title
|
|
52
|
+
color: primary
|
|
53
|
+
variant: outlined
|
|
54
|
+
events:
|
|
55
|
+
onClick:
|
|
56
|
+
- id: modal_html_title_open
|
|
57
|
+
type: CallMethod
|
|
58
|
+
params:
|
|
59
|
+
blockId: modal_html_title
|
|
60
|
+
method: setOpen
|
|
61
|
+
args:
|
|
62
|
+
- open: true
|
|
63
|
+
- id: modal_html_title
|
|
64
|
+
type: Modal
|
|
65
|
+
properties:
|
|
66
|
+
title: <b>Bold</b> and <em>italic</em> title
|
|
67
|
+
blocks:
|
|
68
|
+
- id: modal_html_title_content
|
|
69
|
+
type: Paragraph
|
|
70
|
+
properties:
|
|
71
|
+
content: The modal title supports HTML markup for rich text formatting.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The okText and cancelText properties customize the footer button labels. This modal uses "Save Changes" and "Discard" instead of "Ok" and "Cancel".
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
- id: modal_btn_text_trigger
|
|
78
|
+
type: Button
|
|
79
|
+
layout:
|
|
80
|
+
flex: 0 0 auto
|
|
81
|
+
properties:
|
|
82
|
+
title: Open Modal
|
|
83
|
+
color: primary
|
|
84
|
+
variant: outlined
|
|
85
|
+
events:
|
|
86
|
+
onClick:
|
|
87
|
+
- id: modal_btn_text_open
|
|
88
|
+
type: CallMethod
|
|
89
|
+
params:
|
|
90
|
+
blockId: modal_btn_text
|
|
91
|
+
method: setOpen
|
|
92
|
+
args:
|
|
93
|
+
- open: true
|
|
94
|
+
- id: modal_btn_text
|
|
95
|
+
type: Modal
|
|
96
|
+
properties:
|
|
97
|
+
title: Custom Button Text
|
|
98
|
+
okText: Save Changes
|
|
99
|
+
cancelText: Discard
|
|
100
|
+
blocks:
|
|
101
|
+
- id: modal_btn_text_content
|
|
102
|
+
type: Paragraph
|
|
103
|
+
properties:
|
|
104
|
+
content: The okText and cancelText properties customize the footer button
|
|
105
|
+
labels. This modal uses "Save Changes" and "Discard" instead of "Ok"
|
|
106
|
+
and "Cancel".
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Custom button props allow fine-grained control over the footer buttons. Here the Ok button is styled as a danger button, and the Cancel button uses primary styling.
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
- id: modal_btn_props_trigger
|
|
113
|
+
type: Button
|
|
114
|
+
layout:
|
|
115
|
+
flex: 0 0 auto
|
|
116
|
+
properties:
|
|
117
|
+
title: Open Modal with Custom Buttons
|
|
118
|
+
color: primary
|
|
119
|
+
variant: outlined
|
|
120
|
+
events:
|
|
121
|
+
onClick:
|
|
122
|
+
- id: modal_btn_props_open
|
|
123
|
+
type: CallMethod
|
|
124
|
+
params:
|
|
125
|
+
blockId: modal_btn_props
|
|
126
|
+
method: setOpen
|
|
127
|
+
args:
|
|
128
|
+
- open: true
|
|
129
|
+
- id: modal_btn_props
|
|
130
|
+
type: Modal
|
|
131
|
+
properties:
|
|
132
|
+
title: Danger Confirmation
|
|
133
|
+
okText: Delete
|
|
134
|
+
cancelText: Keep
|
|
135
|
+
okButtonProps:
|
|
136
|
+
danger: true
|
|
137
|
+
cancelButtonProps:
|
|
138
|
+
type: primary
|
|
139
|
+
blocks:
|
|
140
|
+
- id: modal_btn_props_content
|
|
141
|
+
type: Paragraph
|
|
142
|
+
properties:
|
|
143
|
+
content: Custom button props allow fine-grained control over the footer buttons.
|
|
144
|
+
Here the Ok button is styled as a danger button, and the Cancel button
|
|
145
|
+
uses primary styling.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This modal is vertically centered in the viewport. By default, modals appear near the top of the page.
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
- id: modal_centered_trigger
|
|
152
|
+
type: Button
|
|
153
|
+
layout:
|
|
154
|
+
flex: 0 0 auto
|
|
155
|
+
properties:
|
|
156
|
+
title: Open Centered Modal
|
|
157
|
+
color: primary
|
|
158
|
+
variant: outlined
|
|
159
|
+
events:
|
|
160
|
+
onClick:
|
|
161
|
+
- id: modal_centered_open
|
|
162
|
+
type: CallMethod
|
|
163
|
+
params:
|
|
164
|
+
blockId: modal_centered
|
|
165
|
+
method: setOpen
|
|
166
|
+
args:
|
|
167
|
+
- open: true
|
|
168
|
+
- id: modal_centered
|
|
169
|
+
type: Modal
|
|
170
|
+
properties:
|
|
171
|
+
title: Centered Modal
|
|
172
|
+
centered: true
|
|
173
|
+
blocks:
|
|
174
|
+
- id: modal_centered_content
|
|
175
|
+
type: Paragraph
|
|
176
|
+
properties:
|
|
177
|
+
content: This modal is vertically centered in the viewport. By default, modals
|
|
178
|
+
appear near the top of the page.
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
A compact 300px modal, suitable for simple confirmations.
|
|
182
|
+
|
|
183
|
+
An 800px wide modal with more room for complex content like forms, tables, or detail views.
|
|
184
|
+
|
|
185
|
+
Using a percentage width makes the modal responsive, taking up 80% of the viewport width.
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
- id: modal_narrow_trigger
|
|
189
|
+
type: Button
|
|
190
|
+
layout:
|
|
191
|
+
flex: 0 0 auto
|
|
192
|
+
properties:
|
|
193
|
+
title: Narrow (300px)
|
|
194
|
+
color: primary
|
|
195
|
+
variant: outlined
|
|
196
|
+
size: small
|
|
197
|
+
events:
|
|
198
|
+
onClick:
|
|
199
|
+
- id: modal_narrow_open
|
|
200
|
+
type: CallMethod
|
|
201
|
+
params:
|
|
202
|
+
blockId: modal_narrow
|
|
203
|
+
method: setOpen
|
|
204
|
+
args:
|
|
205
|
+
- open: true
|
|
206
|
+
- id: modal_wide_trigger
|
|
207
|
+
type: Button
|
|
208
|
+
layout:
|
|
209
|
+
flex: 0 0 auto
|
|
210
|
+
properties:
|
|
211
|
+
title: Wide (800px)
|
|
212
|
+
color: primary
|
|
213
|
+
variant: outlined
|
|
214
|
+
size: small
|
|
215
|
+
events:
|
|
216
|
+
onClick:
|
|
217
|
+
- id: modal_wide_open
|
|
218
|
+
type: CallMethod
|
|
219
|
+
params:
|
|
220
|
+
blockId: modal_wide
|
|
221
|
+
method: setOpen
|
|
222
|
+
args:
|
|
223
|
+
- open: true
|
|
224
|
+
- id: modal_pct_trigger
|
|
225
|
+
type: Button
|
|
226
|
+
layout:
|
|
227
|
+
flex: 0 0 auto
|
|
228
|
+
properties:
|
|
229
|
+
title: Percentage (80%)
|
|
230
|
+
color: primary
|
|
231
|
+
variant: outlined
|
|
232
|
+
size: small
|
|
233
|
+
events:
|
|
234
|
+
onClick:
|
|
235
|
+
- id: modal_pct_open
|
|
236
|
+
type: CallMethod
|
|
237
|
+
params:
|
|
238
|
+
blockId: modal_pct
|
|
239
|
+
method: setOpen
|
|
240
|
+
args:
|
|
241
|
+
- open: true
|
|
242
|
+
- id: modal_narrow
|
|
243
|
+
type: Modal
|
|
244
|
+
properties:
|
|
245
|
+
title: Narrow Modal
|
|
246
|
+
width: 300
|
|
247
|
+
blocks:
|
|
248
|
+
- id: modal_narrow_content
|
|
249
|
+
type: Paragraph
|
|
250
|
+
properties:
|
|
251
|
+
content: A compact 300px modal, suitable for simple confirmations.
|
|
252
|
+
- id: modal_wide
|
|
253
|
+
type: Modal
|
|
254
|
+
properties:
|
|
255
|
+
title: Wide Modal
|
|
256
|
+
width: 800
|
|
257
|
+
blocks:
|
|
258
|
+
- id: modal_wide_content
|
|
259
|
+
type: Paragraph
|
|
260
|
+
properties:
|
|
261
|
+
content: An 800px wide modal with more room for complex content like forms,
|
|
262
|
+
tables, or detail views.
|
|
263
|
+
- id: modal_pct
|
|
264
|
+
type: Modal
|
|
265
|
+
properties:
|
|
266
|
+
title: 80% Width Modal
|
|
267
|
+
width: 80%
|
|
268
|
+
blocks:
|
|
269
|
+
- id: modal_pct_content
|
|
270
|
+
type: Paragraph
|
|
271
|
+
properties:
|
|
272
|
+
content: Using a percentage width makes the modal responsive, taking up 80% of
|
|
273
|
+
the viewport width.
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
The close button is visible in the top right corner. This is the default behavior.
|
|
277
|
+
|
|
278
|
+
The close (x) button is hidden. Users must use the Ok or Cancel buttons to close this modal.
|
|
279
|
+
|
|
280
|
+
```yaml
|
|
281
|
+
- id: modal_closable_trigger
|
|
282
|
+
type: Button
|
|
283
|
+
layout:
|
|
284
|
+
flex: 0 0 auto
|
|
285
|
+
properties:
|
|
286
|
+
title: Closable (default)
|
|
287
|
+
color: primary
|
|
288
|
+
variant: outlined
|
|
289
|
+
events:
|
|
290
|
+
onClick:
|
|
291
|
+
- id: modal_closable_open
|
|
292
|
+
type: CallMethod
|
|
293
|
+
params:
|
|
294
|
+
blockId: modal_closable
|
|
295
|
+
method: setOpen
|
|
296
|
+
args:
|
|
297
|
+
- open: true
|
|
298
|
+
- id: modal_not_closable_trigger
|
|
299
|
+
type: Button
|
|
300
|
+
layout:
|
|
301
|
+
flex: 0 0 auto
|
|
302
|
+
properties:
|
|
303
|
+
title: No Close Button
|
|
304
|
+
color: danger
|
|
305
|
+
variant: outlined
|
|
306
|
+
events:
|
|
307
|
+
onClick:
|
|
308
|
+
- id: modal_not_closable_open
|
|
309
|
+
type: CallMethod
|
|
310
|
+
params:
|
|
311
|
+
blockId: modal_not_closable
|
|
312
|
+
method: setOpen
|
|
313
|
+
args:
|
|
314
|
+
- open: true
|
|
315
|
+
- id: modal_closable
|
|
316
|
+
type: Modal
|
|
317
|
+
properties:
|
|
318
|
+
title: Closable Modal
|
|
319
|
+
closable: true
|
|
320
|
+
blocks:
|
|
321
|
+
- id: modal_closable_content
|
|
322
|
+
type: Paragraph
|
|
323
|
+
properties:
|
|
324
|
+
content: The close button is visible in the top right corner. This is the
|
|
325
|
+
default behavior.
|
|
326
|
+
- id: modal_not_closable
|
|
327
|
+
type: Modal
|
|
328
|
+
properties:
|
|
329
|
+
title: No Close Button
|
|
330
|
+
closable: false
|
|
331
|
+
blocks:
|
|
332
|
+
- id: modal_not_closable_content
|
|
333
|
+
type: Paragraph
|
|
334
|
+
properties:
|
|
335
|
+
content: The close (x) button is hidden. Users must use the Ok or Cancel buttons
|
|
336
|
+
to close this modal.
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
The mask is visible but clicking it does not close the modal. Users must use the buttons or close icon.
|
|
340
|
+
|
|
341
|
+
No mask overlay is shown behind the modal. The page content remains fully visible.
|
|
342
|
+
|
|
343
|
+
```yaml
|
|
344
|
+
- id: modal_mask_not_closable_trigger
|
|
345
|
+
type: Button
|
|
346
|
+
layout:
|
|
347
|
+
flex: 0 0 auto
|
|
348
|
+
properties:
|
|
349
|
+
title: Mask Not Closable
|
|
350
|
+
color: primary
|
|
351
|
+
variant: outlined
|
|
352
|
+
events:
|
|
353
|
+
onClick:
|
|
354
|
+
- id: modal_mask_not_closable_open
|
|
355
|
+
type: CallMethod
|
|
356
|
+
params:
|
|
357
|
+
blockId: modal_mask_not_closable
|
|
358
|
+
method: setOpen
|
|
359
|
+
args:
|
|
360
|
+
- open: true
|
|
361
|
+
- id: modal_no_mask_trigger
|
|
362
|
+
type: Button
|
|
363
|
+
layout:
|
|
364
|
+
flex: 0 0 auto
|
|
365
|
+
properties:
|
|
366
|
+
title: No Mask
|
|
367
|
+
color: primary
|
|
368
|
+
variant: outlined
|
|
369
|
+
events:
|
|
370
|
+
onClick:
|
|
371
|
+
- id: modal_no_mask_open
|
|
372
|
+
type: CallMethod
|
|
373
|
+
params:
|
|
374
|
+
blockId: modal_no_mask
|
|
375
|
+
method: setOpen
|
|
376
|
+
args:
|
|
377
|
+
- open: true
|
|
378
|
+
- id: modal_mask_not_closable
|
|
379
|
+
type: Modal
|
|
380
|
+
properties:
|
|
381
|
+
title: Mask Not Closable
|
|
382
|
+
maskClosable: false
|
|
383
|
+
blocks:
|
|
384
|
+
- id: modal_mask_not_closable_content
|
|
385
|
+
type: Paragraph
|
|
386
|
+
properties:
|
|
387
|
+
content: The mask is visible but clicking it does not close the modal. Users
|
|
388
|
+
must use the buttons or close icon.
|
|
389
|
+
- id: modal_no_mask
|
|
390
|
+
type: Modal
|
|
391
|
+
properties:
|
|
392
|
+
title: No Mask
|
|
393
|
+
mask: false
|
|
394
|
+
blocks:
|
|
395
|
+
- id: modal_no_mask_content
|
|
396
|
+
type: Paragraph
|
|
397
|
+
properties:
|
|
398
|
+
content: No mask overlay is shown behind the modal. The page content remains
|
|
399
|
+
fully visible.
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Setting footer to false removes the Ok and Cancel buttons entirely. This is useful for informational dialogs or when you provide your own action buttons in the content area.
|
|
403
|
+
|
|
404
|
+
```yaml
|
|
405
|
+
- id: modal_no_footer_trigger
|
|
406
|
+
type: Button
|
|
407
|
+
layout:
|
|
408
|
+
flex: 0 0 auto
|
|
409
|
+
properties:
|
|
410
|
+
title: Open Modal (no footer)
|
|
411
|
+
color: primary
|
|
412
|
+
variant: outlined
|
|
413
|
+
events:
|
|
414
|
+
onClick:
|
|
415
|
+
- id: modal_no_footer_open
|
|
416
|
+
type: CallMethod
|
|
417
|
+
params:
|
|
418
|
+
blockId: modal_no_footer
|
|
419
|
+
method: setOpen
|
|
420
|
+
args:
|
|
421
|
+
- open: true
|
|
422
|
+
- id: modal_no_footer
|
|
423
|
+
type: Modal
|
|
424
|
+
properties:
|
|
425
|
+
title: No Footer Modal
|
|
426
|
+
footer: false
|
|
427
|
+
blocks:
|
|
428
|
+
- id: modal_no_footer_content
|
|
429
|
+
type: Paragraph
|
|
430
|
+
properties:
|
|
431
|
+
content: Setting footer to false removes the Ok and Cancel buttons entirely.
|
|
432
|
+
This is useful for informational dialogs or when you provide your own
|
|
433
|
+
action buttons in the content area.
|
|
434
|
+
- id: modal_no_footer_close_btn
|
|
435
|
+
type: Button
|
|
436
|
+
properties:
|
|
437
|
+
title: Close
|
|
438
|
+
color: primary
|
|
439
|
+
variant: solid
|
|
440
|
+
block: true
|
|
441
|
+
events:
|
|
442
|
+
onClick:
|
|
443
|
+
- id: modal_no_footer_close
|
|
444
|
+
type: CallMethod
|
|
445
|
+
params:
|
|
446
|
+
blockId: modal_no_footer
|
|
447
|
+
method: setOpen
|
|
448
|
+
args:
|
|
449
|
+
- open: false
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
The footer slot replaces the default Ok/Cancel buttons with custom content. This example shows a Delete button on the left and Save/Cancel on the right.
|
|
453
|
+
|
|
454
|
+
```yaml
|
|
455
|
+
- id: modal_footer_slot_trigger
|
|
456
|
+
type: Button
|
|
457
|
+
layout:
|
|
458
|
+
flex: 0 0 auto
|
|
459
|
+
properties:
|
|
460
|
+
title: Open Modal with Custom Footer
|
|
461
|
+
color: primary
|
|
462
|
+
variant: solid
|
|
463
|
+
events:
|
|
464
|
+
onClick:
|
|
465
|
+
- id: modal_footer_slot_open
|
|
466
|
+
type: CallMethod
|
|
467
|
+
params:
|
|
468
|
+
blockId: modal_footer_slot
|
|
469
|
+
method: setOpen
|
|
470
|
+
args:
|
|
471
|
+
- open: true
|
|
472
|
+
- id: modal_footer_slot
|
|
473
|
+
type: Modal
|
|
474
|
+
properties:
|
|
475
|
+
title: Custom Footer
|
|
476
|
+
slots:
|
|
477
|
+
footer:
|
|
478
|
+
blocks:
|
|
479
|
+
- id: modal_footer_slot_row
|
|
480
|
+
type: Box
|
|
481
|
+
layout:
|
|
482
|
+
gap: 8
|
|
483
|
+
justify: space-between
|
|
484
|
+
blocks:
|
|
485
|
+
- id: modal_footer_delete_btn
|
|
486
|
+
type: Button
|
|
487
|
+
layout:
|
|
488
|
+
flex: 0 0 auto
|
|
489
|
+
properties:
|
|
490
|
+
title: Delete
|
|
491
|
+
color: danger
|
|
492
|
+
variant: text
|
|
493
|
+
icon: AiOutlineDelete
|
|
494
|
+
- id: modal_footer_actions
|
|
495
|
+
type: Box
|
|
496
|
+
layout:
|
|
497
|
+
flex: 0 0 auto
|
|
498
|
+
gap: 8
|
|
499
|
+
blocks:
|
|
500
|
+
- id: modal_footer_cancel_btn
|
|
501
|
+
type: Button
|
|
502
|
+
layout:
|
|
503
|
+
flex: 0 0 auto
|
|
504
|
+
properties:
|
|
505
|
+
title: Cancel
|
|
506
|
+
color: default
|
|
507
|
+
variant: outlined
|
|
508
|
+
events:
|
|
509
|
+
onClick:
|
|
510
|
+
- id: modal_footer_cancel_close
|
|
511
|
+
type: CallMethod
|
|
512
|
+
params:
|
|
513
|
+
blockId: modal_footer_slot
|
|
514
|
+
method: setOpen
|
|
515
|
+
args:
|
|
516
|
+
- open: false
|
|
517
|
+
- id: modal_footer_save_btn
|
|
518
|
+
type: Button
|
|
519
|
+
layout:
|
|
520
|
+
flex: 0 0 auto
|
|
521
|
+
properties:
|
|
522
|
+
title: Save
|
|
523
|
+
color: primary
|
|
524
|
+
variant: solid
|
|
525
|
+
icon: AiOutlineSave
|
|
526
|
+
events:
|
|
527
|
+
onClick:
|
|
528
|
+
- id: modal_footer_save_close
|
|
529
|
+
type: CallMethod
|
|
530
|
+
params:
|
|
531
|
+
blockId: modal_footer_slot
|
|
532
|
+
method: setOpen
|
|
533
|
+
args:
|
|
534
|
+
- open: false
|
|
535
|
+
blocks:
|
|
536
|
+
- id: modal_footer_slot_content
|
|
537
|
+
type: Paragraph
|
|
538
|
+
properties:
|
|
539
|
+
content: The footer slot replaces the default Ok/Cancel buttons with custom
|
|
540
|
+
content. This example shows a Delete button on the left and
|
|
541
|
+
Save/Cancel on the right.
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
The wrapperStyle property applies CSS to the modal wrapper element. This can control overflow, positioning, and other layout aspects of the wrapper container.
|
|
545
|
+
|
|
546
|
+
```yaml
|
|
547
|
+
- id: modal_wrapper_style_trigger
|
|
548
|
+
type: Button
|
|
549
|
+
layout:
|
|
550
|
+
flex: 0 0 auto
|
|
551
|
+
properties:
|
|
552
|
+
title: Open Modal with Wrapper Style
|
|
553
|
+
color: primary
|
|
554
|
+
variant: outlined
|
|
555
|
+
events:
|
|
556
|
+
onClick:
|
|
557
|
+
- id: modal_wrapper_style_open
|
|
558
|
+
type: CallMethod
|
|
559
|
+
params:
|
|
560
|
+
blockId: modal_wrapper_style
|
|
561
|
+
method: setOpen
|
|
562
|
+
args:
|
|
563
|
+
- open: true
|
|
564
|
+
- id: modal_wrapper_style
|
|
565
|
+
type: Modal
|
|
566
|
+
properties:
|
|
567
|
+
title: Wrapper Style Modal
|
|
568
|
+
wrapperStyle:
|
|
569
|
+
overflow: hidden
|
|
570
|
+
blocks:
|
|
571
|
+
- id: modal_wrapper_style_content
|
|
572
|
+
type: Paragraph
|
|
573
|
+
properties:
|
|
574
|
+
content: The wrapperStyle property applies CSS to the modal wrapper element.
|
|
575
|
+
This can control overflow, positioning, and other layout aspects of
|
|
576
|
+
the wrapper container.
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
This modal uses a custom z-index of 2000 to ensure it appears above other overlays. The default is 1000.
|
|
580
|
+
|
|
581
|
+
```yaml
|
|
582
|
+
- id: modal_zindex_trigger
|
|
583
|
+
type: Button
|
|
584
|
+
layout:
|
|
585
|
+
flex: 0 0 auto
|
|
586
|
+
properties:
|
|
587
|
+
title: Open Modal (z-index 2000)
|
|
588
|
+
color: primary
|
|
589
|
+
variant: outlined
|
|
590
|
+
events:
|
|
591
|
+
onClick:
|
|
592
|
+
- id: modal_zindex_open
|
|
593
|
+
type: CallMethod
|
|
594
|
+
params:
|
|
595
|
+
blockId: modal_zindex
|
|
596
|
+
method: setOpen
|
|
597
|
+
args:
|
|
598
|
+
- open: true
|
|
599
|
+
- id: modal_zindex
|
|
600
|
+
type: Modal
|
|
601
|
+
properties:
|
|
602
|
+
title: High Z-Index Modal
|
|
603
|
+
zIndex: 2000
|
|
604
|
+
blocks:
|
|
605
|
+
- id: modal_zindex_content
|
|
606
|
+
type: Paragraph
|
|
607
|
+
properties:
|
|
608
|
+
content: This modal uses a custom z-index of 2000 to ensure it appears above
|
|
609
|
+
other overlays. The default is 1000.
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
This modal uses the toggleOpen method. Each click of the button alternates between open and closed states.
|
|
613
|
+
|
|
614
|
+
```yaml
|
|
615
|
+
- id: modal_toggle_trigger
|
|
616
|
+
type: Button
|
|
617
|
+
layout:
|
|
618
|
+
flex: 0 0 auto
|
|
619
|
+
properties:
|
|
620
|
+
title: Toggle Modal
|
|
621
|
+
color: primary
|
|
622
|
+
variant: solid
|
|
623
|
+
icon: AiOutlineSwap
|
|
624
|
+
events:
|
|
625
|
+
onClick:
|
|
626
|
+
- id: modal_toggle_call
|
|
627
|
+
type: CallMethod
|
|
628
|
+
params:
|
|
629
|
+
blockId: modal_toggle
|
|
630
|
+
method: toggleOpen
|
|
631
|
+
- id: modal_toggle
|
|
632
|
+
type: Modal
|
|
633
|
+
properties:
|
|
634
|
+
title: Toggle Modal
|
|
635
|
+
blocks:
|
|
636
|
+
- id: modal_toggle_content
|
|
637
|
+
type: Paragraph
|
|
638
|
+
properties:
|
|
639
|
+
content: This modal uses the toggleOpen method. Each click of the button
|
|
640
|
+
alternates between open and closed states.
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
This modal demonstrates all four events. onOpen fires when the modal opens, onOk when the Ok button is clicked, onCancel when Cancel is clicked, and onClose fires after either onOk or onCancel completes.
|
|
644
|
+
|
|
645
|
+
```yaml
|
|
646
|
+
- id: modal_events_trigger
|
|
647
|
+
type: Button
|
|
648
|
+
layout:
|
|
649
|
+
flex: 0 0 auto
|
|
650
|
+
properties:
|
|
651
|
+
title: Open Modal with Events
|
|
652
|
+
color: primary
|
|
653
|
+
variant: solid
|
|
654
|
+
events:
|
|
655
|
+
onClick:
|
|
656
|
+
- id: modal_events_open
|
|
657
|
+
type: CallMethod
|
|
658
|
+
params:
|
|
659
|
+
blockId: modal_events
|
|
660
|
+
method: setOpen
|
|
661
|
+
args:
|
|
662
|
+
- open: true
|
|
663
|
+
- id: modal_events
|
|
664
|
+
type: Modal
|
|
665
|
+
properties:
|
|
666
|
+
title: Modal with Events
|
|
667
|
+
events:
|
|
668
|
+
onOpen:
|
|
669
|
+
- id: modal_events_on_open
|
|
670
|
+
type: DisplayMessage
|
|
671
|
+
params:
|
|
672
|
+
content: Modal opened.
|
|
673
|
+
status: info
|
|
674
|
+
onOk:
|
|
675
|
+
- id: modal_events_on_ok
|
|
676
|
+
type: DisplayMessage
|
|
677
|
+
params:
|
|
678
|
+
content: Ok button clicked.
|
|
679
|
+
status: success
|
|
680
|
+
onCancel:
|
|
681
|
+
- id: modal_events_on_cancel
|
|
682
|
+
type: DisplayMessage
|
|
683
|
+
params:
|
|
684
|
+
content: Cancel button clicked.
|
|
685
|
+
status: warning
|
|
686
|
+
onClose:
|
|
687
|
+
- id: modal_events_on_close
|
|
688
|
+
type: DisplayMessage
|
|
689
|
+
params:
|
|
690
|
+
content: Modal closed.
|
|
691
|
+
status: info
|
|
692
|
+
blocks:
|
|
693
|
+
- id: modal_events_content
|
|
694
|
+
type: Paragraph
|
|
695
|
+
properties:
|
|
696
|
+
content: This modal demonstrates all four events. onOpen fires when the modal
|
|
697
|
+
opens, onOk when the Ok button is clicked, onCancel when Cancel is
|
|
698
|
+
clicked, and onClose fires after either onOk or onCancel completes.
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
This modal overrides design tokens via the theme property. The header has a blue background, custom title color and size, and larger border radius.
|
|
702
|
+
|
|
703
|
+
A warm-toned modal using an extensive set of theme tokens including headerBg, contentBg, footerBg, titleColor, colorBgMask, headerBorderBottom, footerBorderTop, headerPadding, bodyPadding, footerPadding, and margin tokens.
|
|
704
|
+
|
|
705
|
+
```yaml
|
|
706
|
+
- id: modal_theme_blue_trigger
|
|
707
|
+
type: Button
|
|
708
|
+
layout:
|
|
709
|
+
flex: 0 0 auto
|
|
710
|
+
properties:
|
|
711
|
+
title: Open Blue Themed Modal
|
|
712
|
+
color: primary
|
|
713
|
+
variant: solid
|
|
714
|
+
events:
|
|
715
|
+
onClick:
|
|
716
|
+
- id: modal_theme_blue_open
|
|
717
|
+
type: CallMethod
|
|
718
|
+
params:
|
|
719
|
+
blockId: modal_theme_blue
|
|
720
|
+
method: setOpen
|
|
721
|
+
args:
|
|
722
|
+
- open: true
|
|
723
|
+
- id: modal_theme_blue
|
|
724
|
+
type: Modal
|
|
725
|
+
properties:
|
|
726
|
+
title: Blue Theme Modal
|
|
727
|
+
theme:
|
|
728
|
+
titleColor: "#0958d9"
|
|
729
|
+
titleFontSize: 20
|
|
730
|
+
titleLineHeight: 1.8
|
|
731
|
+
borderRadiusLG: 16
|
|
732
|
+
blocks:
|
|
733
|
+
- id: modal_theme_blue_content
|
|
734
|
+
type: Paragraph
|
|
735
|
+
properties:
|
|
736
|
+
content: This modal overrides design tokens via the theme property. The header
|
|
737
|
+
has a blue background, custom title color and size, and larger border
|
|
738
|
+
radius.
|
|
739
|
+
- id: modal_theme_warm_trigger
|
|
740
|
+
type: Button
|
|
741
|
+
layout:
|
|
742
|
+
flex: 0 0 auto
|
|
743
|
+
properties:
|
|
744
|
+
title: Open Warm Themed Modal
|
|
745
|
+
color: default
|
|
746
|
+
variant: solid
|
|
747
|
+
events:
|
|
748
|
+
onClick:
|
|
749
|
+
- id: modal_theme_warm_open
|
|
750
|
+
type: CallMethod
|
|
751
|
+
params:
|
|
752
|
+
blockId: modal_theme_warm
|
|
753
|
+
method: setOpen
|
|
754
|
+
args:
|
|
755
|
+
- open: true
|
|
756
|
+
- id: modal_theme_warm
|
|
757
|
+
type: Modal
|
|
758
|
+
properties:
|
|
759
|
+
title: Warm Theme Modal
|
|
760
|
+
theme:
|
|
761
|
+
titleColor: "#d46b08"
|
|
762
|
+
colorBgMask: rgba(250, 173, 20, 0.1)
|
|
763
|
+
borderRadiusLG: 20
|
|
764
|
+
headerBorderBottom: 1px solid
|
|
765
|
+
footerBorderTop: 1px solid
|
|
766
|
+
headerMarginBottom: 0
|
|
767
|
+
footerMarginTop: 0
|
|
768
|
+
headerPadding: 16px 24px
|
|
769
|
+
bodyPadding: 24
|
|
770
|
+
footerPadding: 16px 24px
|
|
771
|
+
blocks:
|
|
772
|
+
- id: modal_theme_warm_content
|
|
773
|
+
type: Paragraph
|
|
774
|
+
properties:
|
|
775
|
+
content: A warm-toned modal using an extensive set of theme tokens including
|
|
776
|
+
headerBg, contentBg, footerBg, titleColor, colorBgMask,
|
|
777
|
+
headerBorderBottom, footerBorderTop, headerPadding, bodyPadding,
|
|
778
|
+
footerPadding, and margin tokens.
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
This modal uses style.body and style.mask to apply custom background colors. The body has a green tint and the mask has a subtle green overlay.
|
|
782
|
+
|
|
783
|
+
The element, wrapper, header, body, footer, mask, and content CSS keys allow targeting different parts of the modal with inline styles or Tailwind classes.
|
|
784
|
+
|
|
785
|
+
```yaml
|
|
786
|
+
- id: modal_styled_body_trigger
|
|
787
|
+
type: Button
|
|
788
|
+
layout:
|
|
789
|
+
flex: 0 0 auto
|
|
790
|
+
properties:
|
|
791
|
+
title: Open Styled Modal
|
|
792
|
+
color: primary
|
|
793
|
+
variant: solid
|
|
794
|
+
events:
|
|
795
|
+
onClick:
|
|
796
|
+
- id: modal_styled_body_open
|
|
797
|
+
type: CallMethod
|
|
798
|
+
params:
|
|
799
|
+
blockId: modal_styled_body
|
|
800
|
+
method: setOpen
|
|
801
|
+
args:
|
|
802
|
+
- open: true
|
|
803
|
+
- id: modal_styled_body
|
|
804
|
+
type: Modal
|
|
805
|
+
properties:
|
|
806
|
+
title: Styled Modal
|
|
807
|
+
style:
|
|
808
|
+
.body:
|
|
809
|
+
padding: 24px
|
|
810
|
+
.mask:
|
|
811
|
+
backgroundColor: rgba(0, 100, 0, 0.15)
|
|
812
|
+
blocks:
|
|
813
|
+
- id: modal_styled_body_content
|
|
814
|
+
type: Paragraph
|
|
815
|
+
properties:
|
|
816
|
+
content: This modal uses style.body and style.mask to apply custom background
|
|
817
|
+
colors. The body has a green tint and the mask has a subtle green
|
|
818
|
+
overlay.
|
|
819
|
+
- id: modal_styled_wrapper_trigger
|
|
820
|
+
type: Button
|
|
821
|
+
layout:
|
|
822
|
+
flex: 0 0 auto
|
|
823
|
+
properties:
|
|
824
|
+
title: Open Modal with Wrapper Style
|
|
825
|
+
color: primary
|
|
826
|
+
variant: outlined
|
|
827
|
+
events:
|
|
828
|
+
onClick:
|
|
829
|
+
- id: modal_styled_wrapper_open
|
|
830
|
+
type: CallMethod
|
|
831
|
+
params:
|
|
832
|
+
blockId: modal_styled_wrapper
|
|
833
|
+
method: setOpen
|
|
834
|
+
args:
|
|
835
|
+
- open: true
|
|
836
|
+
- id: modal_styled_wrapper
|
|
837
|
+
type: Modal
|
|
838
|
+
properties:
|
|
839
|
+
title: Custom Wrapper Style
|
|
840
|
+
style:
|
|
841
|
+
.element:
|
|
842
|
+
borderRadius: 20px
|
|
843
|
+
.wrapper:
|
|
844
|
+
backdropFilter: blur(2px)
|
|
845
|
+
blocks:
|
|
846
|
+
- id: modal_styled_wrapper_content
|
|
847
|
+
type: Paragraph
|
|
848
|
+
properties:
|
|
849
|
+
content: The element, wrapper, header, body, footer, mask, and content CSS keys
|
|
850
|
+
allow targeting different parts of the modal with inline styles or
|
|
851
|
+
Tailwind classes.
|
|
852
|
+
```
|
|
853
|
+
|
|
854
|
+
Modal supports these CSS keys for Tailwind class targeting: element, header, body, footer, mask, wrapper, content. Use class as an object to apply Tailwind utilities to each area independently.
|
|
855
|
+
|
|
856
|
+
```yaml
|
|
857
|
+
- id: modal_css_keys_trigger
|
|
858
|
+
type: Button
|
|
859
|
+
layout:
|
|
860
|
+
flex: 0 0 auto
|
|
861
|
+
properties:
|
|
862
|
+
title: Open Modal with Tailwind Classes
|
|
863
|
+
color: primary
|
|
864
|
+
variant: solid
|
|
865
|
+
events:
|
|
866
|
+
onClick:
|
|
867
|
+
- id: modal_css_keys_open
|
|
868
|
+
type: CallMethod
|
|
869
|
+
params:
|
|
870
|
+
blockId: modal_css_keys
|
|
871
|
+
method: setOpen
|
|
872
|
+
args:
|
|
873
|
+
- open: true
|
|
874
|
+
- id: modal_css_keys
|
|
875
|
+
type: Modal
|
|
876
|
+
properties:
|
|
877
|
+
title: Tailwind Styled Modal
|
|
878
|
+
class:
|
|
879
|
+
header: bg-bg-layout
|
|
880
|
+
body: bg-bg-layout p-8
|
|
881
|
+
footer: bg-bg-layout
|
|
882
|
+
content: rounded-2xl overflow-hidden
|
|
883
|
+
blocks:
|
|
884
|
+
- id: modal_css_keys_content
|
|
885
|
+
type: Paragraph
|
|
886
|
+
properties:
|
|
887
|
+
content: "Modal supports these CSS keys for Tailwind class targeting: element,
|
|
888
|
+
header, body, footer, mask, wrapper, content. Use class as an object
|
|
889
|
+
to apply Tailwind utilities to each area independently."
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
Jane Cooper
|
|
893
|
+
|
|
894
|
+
Senior Product Designer
|
|
895
|
+
|
|
896
|
+
```yaml
|
|
897
|
+
- id: modal_profile_trigger
|
|
898
|
+
type: Button
|
|
899
|
+
layout:
|
|
900
|
+
flex: 0 0 auto
|
|
901
|
+
properties:
|
|
902
|
+
title: Edit Profile
|
|
903
|
+
color: primary
|
|
904
|
+
variant: solid
|
|
905
|
+
icon: AiOutlineEdit
|
|
906
|
+
events:
|
|
907
|
+
onClick:
|
|
908
|
+
- id: modal_profile_open
|
|
909
|
+
type: CallMethod
|
|
910
|
+
params:
|
|
911
|
+
blockId: modal_profile
|
|
912
|
+
method: setOpen
|
|
913
|
+
args:
|
|
914
|
+
- open: true
|
|
915
|
+
- id: modal_profile
|
|
916
|
+
type: Modal
|
|
917
|
+
properties:
|
|
918
|
+
title: Edit Your Profile
|
|
919
|
+
width: 640
|
|
920
|
+
okText: Save Profile
|
|
921
|
+
cancelText: Cancel
|
|
922
|
+
centered: true
|
|
923
|
+
theme:
|
|
924
|
+
headerBorderBottom: 1px solid
|
|
925
|
+
headerMarginBottom: 0
|
|
926
|
+
events:
|
|
927
|
+
onOk:
|
|
928
|
+
- id: modal_profile_save
|
|
929
|
+
type: DisplayMessage
|
|
930
|
+
params:
|
|
931
|
+
content: Profile saved successfully.
|
|
932
|
+
status: success
|
|
933
|
+
blocks:
|
|
934
|
+
- id: modal_profile_avatar_row
|
|
935
|
+
type: Box
|
|
936
|
+
layout:
|
|
937
|
+
gap: 16
|
|
938
|
+
align: center
|
|
939
|
+
blocks:
|
|
940
|
+
- id: modal_profile_avatar
|
|
941
|
+
type: Avatar
|
|
942
|
+
layout:
|
|
943
|
+
flex: 0 0 auto
|
|
944
|
+
properties:
|
|
945
|
+
icon: AiOutlineUser
|
|
946
|
+
size: 72
|
|
947
|
+
color: "#fff"
|
|
948
|
+
backgroundColor: "#1677ff"
|
|
949
|
+
- id: modal_profile_info
|
|
950
|
+
type: Box
|
|
951
|
+
layout:
|
|
952
|
+
flex: 1 1 0
|
|
953
|
+
direction: column
|
|
954
|
+
gap: 4
|
|
955
|
+
blocks:
|
|
956
|
+
- id: modal_profile_name_title
|
|
957
|
+
type: Title
|
|
958
|
+
properties:
|
|
959
|
+
content: Jane Cooper
|
|
960
|
+
level: 4
|
|
961
|
+
- id: modal_profile_role_text
|
|
962
|
+
type: Paragraph
|
|
963
|
+
properties:
|
|
964
|
+
content: Senior Product Designer
|
|
965
|
+
- id: modal_profile_divider
|
|
966
|
+
type: Divider
|
|
967
|
+
- id: modal_profile_name_input
|
|
968
|
+
type: TextInput
|
|
969
|
+
properties:
|
|
970
|
+
title: Full Name
|
|
971
|
+
placeholder: Enter your full name
|
|
972
|
+
- id: modal_profile_email_input
|
|
973
|
+
type: TextInput
|
|
974
|
+
properties:
|
|
975
|
+
title: Email Address
|
|
976
|
+
placeholder: Enter your email
|
|
977
|
+
- id: modal_profile_bio_input
|
|
978
|
+
type: TextArea
|
|
979
|
+
properties:
|
|
980
|
+
title: Bio
|
|
981
|
+
placeholder: Tell us about yourself
|
|
982
|
+
rows: 3
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
This action cannot be undone. All project data, files, and team assignments will be permanently removed.
|
|
986
|
+
|
|
987
|
+
```yaml
|
|
988
|
+
- id: modal_confirm_trigger
|
|
989
|
+
type: Button
|
|
990
|
+
layout:
|
|
991
|
+
flex: 0 0 auto
|
|
992
|
+
properties:
|
|
993
|
+
title: Delete Project
|
|
994
|
+
color: danger
|
|
995
|
+
variant: solid
|
|
996
|
+
icon: AiOutlineDelete
|
|
997
|
+
events:
|
|
998
|
+
onClick:
|
|
999
|
+
- id: modal_confirm_open
|
|
1000
|
+
type: CallMethod
|
|
1001
|
+
params:
|
|
1002
|
+
blockId: modal_confirm
|
|
1003
|
+
method: setOpen
|
|
1004
|
+
args:
|
|
1005
|
+
- open: true
|
|
1006
|
+
- id: modal_confirm
|
|
1007
|
+
type: Modal
|
|
1008
|
+
properties:
|
|
1009
|
+
title: Delete Project?
|
|
1010
|
+
width: 420
|
|
1011
|
+
centered: true
|
|
1012
|
+
okText: Delete Permanently
|
|
1013
|
+
cancelText: Keep Project
|
|
1014
|
+
okButtonProps:
|
|
1015
|
+
danger: true
|
|
1016
|
+
closable: false
|
|
1017
|
+
maskClosable: false
|
|
1018
|
+
theme:
|
|
1019
|
+
titleColor: "#cf1322"
|
|
1020
|
+
events:
|
|
1021
|
+
onOk:
|
|
1022
|
+
- id: modal_confirm_delete
|
|
1023
|
+
type: DisplayMessage
|
|
1024
|
+
params:
|
|
1025
|
+
content: Project deleted.
|
|
1026
|
+
status: success
|
|
1027
|
+
onCancel:
|
|
1028
|
+
- id: modal_confirm_keep
|
|
1029
|
+
type: DisplayMessage
|
|
1030
|
+
params:
|
|
1031
|
+
content: Project kept.
|
|
1032
|
+
status: info
|
|
1033
|
+
blocks:
|
|
1034
|
+
- id: modal_confirm_warning
|
|
1035
|
+
type: Paragraph
|
|
1036
|
+
properties:
|
|
1037
|
+
content: This action cannot be undone. All project data, files, and team
|
|
1038
|
+
assignments will be permanently removed.
|
|
1039
|
+
- id: modal_confirm_details
|
|
1040
|
+
type: Descriptions
|
|
1041
|
+
properties:
|
|
1042
|
+
column: 1
|
|
1043
|
+
size: small
|
|
1044
|
+
items:
|
|
1045
|
+
- label: Project
|
|
1046
|
+
value: Project Alpha
|
|
1047
|
+
- label: Owner
|
|
1048
|
+
value: Jane Cooper
|
|
1049
|
+
- label: Files
|
|
1050
|
+
value: 248 files (1.2 GB)
|
|
1051
|
+
```
|
|
1052
|
+
|
|
1053
|
+
A serene mountain landscape captured at golden hour. Photography by John Doe.
|
|
1054
|
+
|
|
1055
|
+
```yaml
|
|
1056
|
+
- id: modal_image_trigger
|
|
1057
|
+
type: Button
|
|
1058
|
+
layout:
|
|
1059
|
+
flex: 0 0 auto
|
|
1060
|
+
properties:
|
|
1061
|
+
title: Preview Image
|
|
1062
|
+
color: primary
|
|
1063
|
+
variant: outlined
|
|
1064
|
+
icon: AiOutlinePicture
|
|
1065
|
+
events:
|
|
1066
|
+
onClick:
|
|
1067
|
+
- id: modal_image_open
|
|
1068
|
+
type: CallMethod
|
|
1069
|
+
params:
|
|
1070
|
+
blockId: modal_image
|
|
1071
|
+
method: setOpen
|
|
1072
|
+
args:
|
|
1073
|
+
- open: true
|
|
1074
|
+
- id: modal_image
|
|
1075
|
+
type: Modal
|
|
1076
|
+
properties:
|
|
1077
|
+
title: Mountain Landscape
|
|
1078
|
+
width: 720
|
|
1079
|
+
footer: false
|
|
1080
|
+
centered: true
|
|
1081
|
+
theme:
|
|
1082
|
+
bodyPadding: 0
|
|
1083
|
+
headerMarginBottom: 0
|
|
1084
|
+
blocks:
|
|
1085
|
+
- id: modal_image_html
|
|
1086
|
+
type: Html
|
|
1087
|
+
properties:
|
|
1088
|
+
html: <img src="https://picsum.photos/seed/mountain/700/400" alt="Mountain
|
|
1089
|
+
landscape" style="width:100%; display:block;" />
|
|
1090
|
+
- id: modal_image_caption
|
|
1091
|
+
type: Box
|
|
1092
|
+
layout:
|
|
1093
|
+
gap: 8
|
|
1094
|
+
align: center
|
|
1095
|
+
justify: space-between
|
|
1096
|
+
class: p-4
|
|
1097
|
+
blocks:
|
|
1098
|
+
- id: modal_image_desc
|
|
1099
|
+
type: Paragraph
|
|
1100
|
+
layout:
|
|
1101
|
+
flex: 1 1 0
|
|
1102
|
+
properties:
|
|
1103
|
+
content: A serene mountain landscape captured at golden hour. Photography by
|
|
1104
|
+
John Doe.
|
|
1105
|
+
- id: modal_image_tags
|
|
1106
|
+
type: Box
|
|
1107
|
+
layout:
|
|
1108
|
+
flex: 0 0 auto
|
|
1109
|
+
gap: 8
|
|
1110
|
+
blocks:
|
|
1111
|
+
- id: modal_image_tag1
|
|
1112
|
+
type: Tag
|
|
1113
|
+
properties:
|
|
1114
|
+
title: Photography
|
|
1115
|
+
color: blue
|
|
1116
|
+
- id: modal_image_tag2
|
|
1117
|
+
type: Tag
|
|
1118
|
+
properties:
|
|
1119
|
+
title: Featured
|
|
1120
|
+
color: gold
|
|
1121
|
+
```
|
|
1122
|
+
|
|
1123
|
+
| Property | Type | Default | Description |
|
|
1124
|
+
| --- | --- | --- | --- |
|
|
1125
|
+
| `centered` | boolean | `false` | Center the modal vertically. |
|
|
1126
|
+
| `closable` | boolean | `true` | Whether a close (x) button is visible on top right of the modal dialog or not. |
|
|
1127
|
+
| `title` | string | - | The modal dialog's title - supports html. |
|
|
1128
|
+
| `footer` | boolean | `true` | Show footer area. |
|
|
1129
|
+
| `mask` | boolean | `true` | Whether show mask or not. |
|
|
1130
|
+
| `maskClosable` | boolean | `true` | Whether to close the modal dialog when the mask (area outside the modal) is clicked. |
|
|
1131
|
+
| `okText` | string | - | Text of the Ok button. When unset, antd uses the localized default from ConfigProvider locale. |
|
|
1132
|
+
| `okButtonProps` | object | - | Set additional properties for the ok button. |
|
|
1133
|
+
| `cancelText` | string | - | Text of the Cancel button. When unset, antd uses the localized default from ConfigProvider locale. |
|
|
1134
|
+
| `cancelButtonProps` | object | - | Set additional properties for the cancel button. |
|
|
1135
|
+
| `width` | string \| number | `"520px"` | Width of the modal dialog. |
|
|
1136
|
+
| `zIndex` | integer | `1000` | The z-index of the modal. Useful when displaying two modals simultaneously. |
|
|
1137
|
+
| `theme` | object | - | Antd design token overrides for this block. See [antd design tokens](https://ant.design/components/overview#design-token). See [Ant Design modal tokens](https://ant.design/components/modal#design-token). |
|
|
1138
|
+
| `theme.headerBg` | string | - | Background color of the modal header. |
|
|
1139
|
+
| `theme.titleLineHeight` | number | `1.5` | Line height of the modal title. |
|
|
1140
|
+
| `theme.titleFontSize` | number | `16` | Font size of the modal title. |
|
|
1141
|
+
| `theme.titleColor` | string | - | Color of the modal title text. |
|
|
1142
|
+
| `theme.contentBg` | string | - | Background color of the modal content. |
|
|
1143
|
+
| `theme.footerBg` | string | `"transparent"` | Background color of the modal footer. |
|
|
1144
|
+
| `theme.contentPadding` | number \| string | - | Padding of the content area. |
|
|
1145
|
+
| `theme.headerPadding` | number \| string | - | Padding of the header area. |
|
|
1146
|
+
| `theme.headerBorderBottom` | string | - | Border bottom of the header. |
|
|
1147
|
+
| `theme.headerMarginBottom` | number | `8` | Margin bottom of the header. |
|
|
1148
|
+
| `theme.bodyPadding` | number | - | Padding of the body area. |
|
|
1149
|
+
| `theme.footerPadding` | number \| string | - | Padding of the footer area. |
|
|
1150
|
+
| `theme.footerBorderTop` | string | - | Border top of the footer. |
|
|
1151
|
+
| `theme.footerBorderRadius` | number \| string | - | Border radius of the footer. |
|
|
1152
|
+
| `theme.footerMarginTop` | number \| string | `8` | Margin top of the footer. |
|
|
1153
|
+
| `theme.confirmBodyPadding` | number \| string | - | Padding of the confirm modal body. |
|
|
1154
|
+
| `theme.confirmIconMarginInlineEnd` | number \| string | - | Inline end margin of the confirm modal icon. |
|
|
1155
|
+
| `theme.confirmBtnsMarginTop` | number \| string | - | Margin top of the confirm modal buttons. |
|
|
1156
|
+
| `theme.borderRadiusLG` | number | `8` | Border radius of the modal. |
|
|
1157
|
+
| `theme.colorBgMask` | string | `"rgba(0, 0, 0, 0.45)"` | Background color of the modal mask. |
|
|
1158
|
+
|
|
1159
|
+
| Event | Event Data | Description |
|
|
1160
|
+
| --- | --- | --- |
|
|
1161
|
+
| `onOk` | \- | Trigger actions when Ok button is clicked. |
|
|
1162
|
+
| `onOpen` | \- | Trigger actions when modal is opened. |
|
|
1163
|
+
| `onCancel` | \- | Trigger actions when Cancel button is clicked. |
|
|
1164
|
+
| `onClose` | \- | Trigger actions after onOk or onCancel is completed. |
|
|
1165
|
+
|
|
1166
|
+
| Key | Target |
|
|
1167
|
+
| --- | --- |
|
|
1168
|
+
| `/block` | Outer block wrapper (always available). |
|
|
1169
|
+
| `/element` | The Modal element. |
|
|
1170
|
+
| `/header` | The Modal header. |
|
|
1171
|
+
| `/body` | The Modal body. |
|
|
1172
|
+
| `/footer` | The Modal footer. |
|
|
1173
|
+
| `/mask` | The Modal mask. |
|
|
1174
|
+
| `/wrapper` | The Modal wrapper. |
|
|
1175
|
+
| `/content` | The Modal content. |
|
|
1176
|
+
|
|
1177
|
+
| Slot | Description |
|
|
1178
|
+
| --- | --- |
|
|
1179
|
+
| `content` | Main Modal body. |
|
|
1180
|
+
| `footer` | Custom footer. Overrides default Ok/Cancel buttons. |
|