@tabler/core 1.0.0-beta22 → 1.0.0-beta24
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 +1 -1
- package/dist/css/demo.css +2 -2
- package/dist/css/demo.min.css +2 -2
- package/dist/css/demo.rtl.css +2 -2
- package/dist/css/demo.rtl.min.css +2 -2
- package/dist/css/tabler-flags.css +2 -2
- package/dist/css/tabler-flags.min.css +2 -2
- package/dist/css/tabler-flags.rtl.css +2 -2
- package/dist/css/tabler-flags.rtl.min.css +2 -2
- package/dist/css/tabler-marketing.css +4751 -0
- package/dist/css/tabler-marketing.min.css +9 -0
- package/dist/css/tabler-marketing.rtl.css +4751 -0
- package/dist/css/tabler-marketing.rtl.min.css +9 -0
- package/dist/css/tabler-payments.css +2 -2
- package/dist/css/tabler-payments.min.css +2 -2
- package/dist/css/tabler-payments.rtl.css +2 -2
- package/dist/css/tabler-payments.rtl.min.css +2 -2
- package/dist/css/tabler-socials.css +221 -0
- package/dist/css/tabler-socials.min.css +9 -0
- package/dist/css/tabler-socials.rtl.css +221 -0
- package/dist/css/tabler-socials.rtl.min.css +9 -0
- package/dist/css/tabler-vendors.css +25 -19
- package/dist/css/tabler-vendors.min.css +3 -3
- package/dist/css/tabler-vendors.rtl.css +25 -19
- package/dist/css/tabler-vendors.rtl.min.css +3 -3
- package/dist/css/tabler.css +1300 -1501
- package/dist/css/tabler.min.css +4 -4
- package/dist/css/tabler.rtl.css +1300 -1501
- package/dist/css/tabler.rtl.min.css +4 -4
- package/dist/img/social/apple-gray.svg +3 -0
- package/dist/img/social/apple.svg +3 -0
- package/dist/img/social/discord-gray.svg +3 -0
- package/dist/img/social/discord.svg +3 -0
- package/dist/img/social/dribbble-gray.svg +3 -0
- package/dist/img/social/dribbble.svg +4 -0
- package/dist/img/social/facebook-gray.svg +3 -0
- package/dist/img/social/facebook.svg +4 -0
- package/dist/img/social/figma-gray.svg +3 -0
- package/dist/img/social/figma.svg +7 -0
- package/dist/img/social/github-gray.svg +10 -0
- package/dist/img/social/github.svg +10 -0
- package/dist/img/social/google-gray.svg +3 -0
- package/dist/img/social/google.svg +6 -0
- package/dist/img/social/instagram-gray.svg +5 -0
- package/dist/img/social/instagram.svg +18 -0
- package/dist/img/social/linkedin-gray.svg +3 -0
- package/dist/img/social/linkedin.svg +3 -0
- package/dist/img/social/medium-gray.svg +5 -0
- package/dist/img/social/medium.svg +5 -0
- package/dist/img/social/meta-gray.svg +5 -0
- package/dist/img/social/meta.svg +17 -0
- package/dist/img/social/metamask-gray.svg +12 -0
- package/dist/img/social/metamask.svg +14 -0
- package/dist/img/social/pinterest-gray.svg +3 -0
- package/dist/img/social/pinterest.svg +4 -0
- package/dist/img/social/reddit-gray.svg +6 -0
- package/dist/img/social/reddit.svg +11 -0
- package/dist/img/social/signal-gray.svg +10 -0
- package/dist/img/social/signal.svg +10 -0
- package/dist/img/social/skype-gray.svg +3 -0
- package/dist/img/social/skype.svg +3 -0
- package/dist/img/social/snapchat-gray.svg +10 -0
- package/dist/img/social/snapchat.svg +11 -0
- package/dist/img/social/spotify-gray.svg +3 -0
- package/dist/img/social/spotify.svg +3 -0
- package/dist/img/social/telegram-gray.svg +3 -0
- package/dist/img/social/telegram.svg +10 -0
- package/dist/img/social/tiktok-gray.svg +3 -0
- package/dist/img/social/tiktok.svg +5 -0
- package/dist/img/social/tumblr-gray.svg +3 -0
- package/dist/img/social/tumblr.svg +3 -0
- package/dist/img/social/twitch-gray.svg +5 -0
- package/dist/img/social/twitch.svg +6 -0
- package/dist/img/social/vk-gray.svg +3 -0
- package/dist/img/social/vk.svg +4 -0
- package/dist/img/social/x-gray.svg +3 -0
- package/dist/img/social/x.svg +3 -0
- package/dist/img/social/youtube-gray.svg +3 -0
- package/dist/img/social/youtube.svg +11 -0
- package/dist/js/demo-theme.js +2 -2
- package/dist/js/demo-theme.min.js +2 -2
- package/dist/js/demo.js +2 -2
- package/dist/js/demo.min.js +2 -2
- package/dist/js/tabler.esm.js +19 -4
- package/dist/js/tabler.esm.min.js +3 -3
- package/dist/js/tabler.js +19 -4
- package/dist/js/tabler.min.js +4 -4
- package/docs/icons/index.mdx +3 -93
- package/docs/icons/libraries/index.mdx +5 -0
- package/docs/icons/{preact.mdx → libraries/preact.mdx} +4 -2
- package/docs/icons/{react.mdx → libraries/react.mdx} +5 -3
- package/docs/icons/{solidjs.mdx → libraries/solidjs.mdx} +5 -2
- package/docs/icons/{svelte.mdx → libraries/svelte.mdx} +5 -2
- package/docs/icons/{vue.mdx → libraries/vue.mdx} +13 -8
- package/docs/icons/{webfont.mdx → libraries/webfont.mdx} +4 -1
- package/docs/icons/plugins/figma.mdx +15 -0
- package/docs/icons/plugins/index.mdx +4 -0
- package/docs/icons/{eps.mdx → static-files/eps.mdx} +3 -1
- package/docs/icons/static-files/index.mdx +5 -0
- package/docs/icons/{pdf.mdx → static-files/pdf.mdx} +3 -1
- package/docs/icons/static-files/png.mdx +31 -0
- package/docs/icons/{svg.mdx → static-files/svg.mdx} +18 -18
- package/docs/illustrations/index.mdx +8 -0
- package/docs/illustrations/introduction/contents.mdx +77 -0
- package/docs/illustrations/introduction/customization.mdx +431 -0
- package/docs/illustrations/introduction/index.mdx +5 -0
- package/docs/illustrations/introduction/license.mdx +22 -0
- package/docs/img/browsers/brave.svg +1 -0
- package/docs/img/browsers/chrome.svg +1 -0
- package/docs/img/browsers/edge.svg +1 -0
- package/docs/img/browsers/electron.svg +1 -0
- package/docs/img/browsers/firefox.svg +1 -0
- package/docs/img/browsers/internet-explorer.svg +1 -0
- package/docs/img/browsers/opera.svg +1 -0
- package/docs/img/browsers/safari.svg +1 -0
- package/docs/img/browsers/vivaldi.svg +1 -0
- package/docs/img/cover-illustrations-dark.png +0 -0
- package/docs/img/cover-illustrations.png +0 -0
- package/docs/img/cover-tabler-dark.png +0 -0
- package/docs/img/cover-tabler.png +0 -0
- package/docs/img/icons/figma-plugin.png +0 -0
- package/docs/img/icons/package-angular-dark.png +0 -0
- package/docs/img/icons/package-angular.png +0 -0
- package/docs/img/icons/package-eps-dark.png +0 -0
- package/docs/img/icons/package-eps.png +0 -0
- package/docs/img/icons/package-js-dark.png +0 -0
- package/docs/img/icons/package-js.png +0 -0
- package/docs/img/icons/package-pdf-dark.png +0 -0
- package/docs/img/icons/package-pdf.png +0 -0
- package/docs/img/icons/package-png-dark.png +0 -0
- package/docs/img/icons/package-png.png +0 -0
- package/docs/img/icons/package-preact-dark.png +0 -0
- package/docs/img/icons/package-preact.png +0 -0
- package/docs/img/icons/package-react-dark.png +0 -0
- package/docs/img/icons/package-react-native-dark.png +0 -0
- package/docs/img/icons/package-react-native.png +0 -0
- package/docs/img/icons/package-react.png +0 -0
- package/docs/img/icons/package-solidjs-dark.png +0 -0
- package/docs/img/icons/package-solidjs.png +0 -0
- package/docs/img/icons/package-sprite-dark.png +0 -0
- package/docs/img/icons/package-sprite.png +0 -0
- package/docs/img/icons/package-svelte-dark.png +0 -0
- package/docs/img/icons/package-svelte.png +0 -0
- package/docs/img/icons/package-svg-dark.png +0 -0
- package/docs/img/icons/package-svg.png +0 -0
- package/docs/img/icons/package-vue-dark.png +0 -0
- package/docs/img/icons/package-vue.png +0 -0
- package/docs/img/icons/package-webfont-dark.png +0 -0
- package/docs/img/icons/package-webfont.png +0 -0
- package/docs/index.mdx +16 -0
- package/docs/ui/base/colors.mdx +63 -5
- package/docs/ui/base/index.mdx +6 -0
- package/docs/ui/base/typography.mdx +96 -101
- package/docs/ui/components/alerts.mdx +45 -120
- package/docs/ui/components/autosize.mdx +12 -3
- package/docs/ui/components/avatars.mdx +7 -4
- package/docs/ui/components/badges.mdx +66 -75
- package/docs/ui/components/breadcrumb.mdx +125 -59
- package/docs/ui/components/buttons.mdx +142 -87
- package/docs/ui/components/cards.mdx +48 -27
- package/docs/ui/components/carousel.mdx +8 -7
- package/docs/ui/components/charts.mdx +15 -24
- package/docs/ui/components/countup.mdx +74 -45
- package/docs/ui/components/datagrid.mdx +10 -2
- package/docs/ui/components/divider.mdx +6 -6
- package/docs/ui/components/dropdowns.mdx +24 -15
- package/docs/ui/components/dropzone.mdx +39 -14
- package/docs/ui/components/empty.mdx +7 -5
- package/docs/ui/components/icons.mdx +53 -14
- package/docs/ui/components/index.mdx +6 -0
- package/docs/ui/components/inline-player.mdx +31 -4
- package/docs/ui/components/modals.mdx +53 -18
- package/docs/ui/components/offcanvas.mdx +55 -0
- package/docs/ui/components/placeholder.mdx +25 -25
- package/docs/ui/components/popover.mdx +8 -9
- package/docs/ui/components/progress.mdx +120 -19
- package/docs/ui/components/range-slider.mdx +17 -3
- package/docs/ui/components/ribbons.mdx +13 -12
- package/docs/ui/components/spinners.mdx +31 -10
- package/docs/ui/components/statuses.mdx +50 -13
- package/docs/ui/components/steps.mdx +62 -19
- package/docs/ui/components/switch-icon.mdx +4 -3
- package/docs/ui/components/tables.mdx +37 -17
- package/docs/ui/components/tabs.mdx +17 -11
- package/docs/ui/components/timelines.mdx +48 -29
- package/docs/ui/components/tinymce.mdx +3 -3
- package/docs/ui/components/toasts.mdx +3 -2
- package/docs/ui/components/tooltips.mdx +4 -3
- package/docs/ui/components/tracking.mdx +39 -34
- package/docs/ui/components/vector-maps.mdx +170 -0
- package/docs/ui/forms/form-color-check.mdx +36 -11
- package/docs/ui/forms/form-elements.mdx +32 -17
- package/docs/ui/forms/form-fieldset.mdx +3 -2
- package/docs/ui/forms/form-helpers.mdx +71 -4
- package/docs/ui/forms/form-image-check.mdx +43 -29
- package/docs/ui/forms/form-input-mask.mdx +33 -5
- package/docs/ui/forms/form-selectboxes.mdx +101 -16
- package/docs/ui/forms/form-validation.mdx +54 -13
- package/docs/ui/forms/index.mdx +6 -0
- package/docs/ui/getting-started/browser-support.mdx +10 -2
- package/docs/ui/getting-started/customize.mdx +5 -4
- package/docs/ui/getting-started/download.mdx +3 -5
- package/docs/ui/getting-started/faq.mdx +3 -1
- package/docs/ui/getting-started/how-to-contribute.mdx +96 -0
- package/docs/ui/getting-started/index.mdx +4 -28
- package/docs/ui/getting-started/installation.mdx +67 -0
- package/docs/ui/getting-started/license.mdx +30 -0
- package/docs/ui/index.mdx +8 -0
- package/docs/ui/layout/index.mdx +6 -0
- package/docs/ui/layout/navbars.mdx +106 -0
- package/docs/ui/layout/navs-tabls.mdx +187 -0
- package/docs/ui/layout/page-headers.mdx +16 -9
- package/docs/ui/layout/page-layouts.mdx +10 -6
- package/docs/ui/plugins/flags.mdx +270 -6
- package/docs/ui/plugins/index.mdx +6 -0
- package/docs/ui/plugins/payments.mdx +108 -4
- package/docs/ui/plugins/social-icons.mdx +135 -0
- package/docs/ui/utilities/borders.mdx +69 -49
- package/docs/ui/utilities/cursors.mdx +22 -51
- package/docs/ui/utilities/index.mdx +5 -0
- package/docs/ui/utilities/interactions.mdx +10 -5
- package/docs/ui/utilities/margins.mdx +234 -0
- package/docs/ui/utilities/vertical-align.mdx +66 -0
- package/docs/ui/utilities/visually-hidden.mdx +12 -0
- package/package.json +9 -6
- package/src/js/src/countup.js +17 -0
- package/src/js/tabler.esm.js +1 -0
- package/src/js/tabler.js +1 -0
- package/src/scss/_utilities-marketing.scss +209 -0
- package/src/scss/_utilities.scss +5 -9
- package/src/scss/_variables-marketing.scss +0 -0
- package/src/scss/_variables.scss +57 -22
- package/src/scss/layout/_animations.scss +2 -1
- package/src/scss/layout/_navbar.scss +0 -1
- package/src/scss/marketing/_browser.scss +67 -0
- package/src/scss/marketing/_core.scss +8 -0
- package/src/scss/marketing/_filters.scss +0 -0
- package/src/scss/marketing/_hero.scss +69 -0
- package/src/scss/marketing/_pricing.scss +111 -0
- package/src/scss/marketing/_sections.scss +124 -0
- package/src/scss/marketing/_shape.scss +31 -0
- package/src/scss/mixins/_mixins.scss +2 -2
- package/src/scss/tabler-marketing.scss +13 -0
- package/src/scss/tabler-socials.scss +2 -0
- package/src/scss/tabler-vendors.scss +1 -0
- package/src/scss/ui/_buttons.scss +8 -7
- package/src/scss/ui/_forms.scss +4 -0
- package/src/scss/ui/_images.scss +4 -0
- package/src/scss/ui/_lists.scss +11 -15
- package/src/scss/ui/_social.scss +52 -0
- package/src/scss/ui/_tables.scss +0 -1
- package/src/scss/ui/_type.scss +4 -0
- package/src/scss/utils/_colors.scss +1 -1
- package/src/scss/vendor/_dropzone.scss +3 -3
- package/src/scss/vendor/_tom-select.scss +1 -0
- package/src/scss/vendor/_typed.scss +4 -0
- package/dist/css/tabler-social.css +0 -10
- package/dist/css/tabler-social.min.css +0 -8
- package/dist/css/tabler-social.rtl.css +0 -10
- package/dist/css/tabler-social.rtl.min.css +0 -8
- package/docs/icons/figma.mdx +0 -7
- package/docs/icons/png.mdx +0 -19
- package/docs/menu.json +0 -317
- package/docs/ui/components/progressbg.mdx +0 -16
- package/src/scss/tabler-social.scss +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Dropdowns
|
|
3
|
-
|
|
3
|
+
summary: Use dropdowns to display lists of options or include more positions in a menu without overwhelming users with too many buttons and long lists. Dropdowns facilitate users' interaction with your website or software and make your design look clear.
|
|
4
4
|
bootstrapLink: components/dropdowns
|
|
5
|
+
description: Organize options with dropdown menus.
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
## Default dropdown
|
|
8
9
|
|
|
9
10
|
With small markup changes, you can turn any `.btn` into a dropdown toggle and use it to display more options for users to choose from. Start with the default dropdown and then use additional classes to make your dropdown more user-friendly.
|
|
10
11
|
|
|
11
|
-
```html example
|
|
12
|
+
```html example height="16rem"
|
|
12
13
|
<div class="dropdown">
|
|
13
14
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
14
15
|
<div class="dropdown-menu">
|
|
@@ -23,7 +24,7 @@ With small markup changes, you can turn any `.btn` into a dropdown toggle and us
|
|
|
23
24
|
|
|
24
25
|
Use dropdown dividers to separate groups of dropdown items for greater clarity.
|
|
25
26
|
|
|
26
|
-
```html example
|
|
27
|
+
```html example height="16rem"
|
|
27
28
|
<div class="dropdown">
|
|
28
29
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
29
30
|
<div class="dropdown-menu">
|
|
@@ -43,7 +44,7 @@ Use dropdown dividers to separate groups of dropdown items for greater clarity.
|
|
|
43
44
|
|
|
44
45
|
Make a dropdown item look active, so that it highlights when a user hovers over a given option.
|
|
45
46
|
|
|
46
|
-
```html example
|
|
47
|
+
```html example height="16rem"
|
|
47
48
|
<div class="dropdown">
|
|
48
49
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
49
50
|
<div class="dropdown-menu">
|
|
@@ -62,7 +63,7 @@ Make a dropdown item look active, so that it highlights when a user hovers over
|
|
|
62
63
|
|
|
63
64
|
Make a dropdown item look disabled to display options which are currently not available but can activate once certain conditions are met.
|
|
64
65
|
|
|
65
|
-
```html
|
|
66
|
+
```html example height="16rem"
|
|
66
67
|
<div class="dropdown">
|
|
67
68
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
68
69
|
<div class="dropdown-menu">
|
|
@@ -81,7 +82,7 @@ Make a dropdown item look disabled to display options which are currently not av
|
|
|
81
82
|
|
|
82
83
|
Add a dropdown header to group dropdown items into sections and name them accordingly.
|
|
83
84
|
|
|
84
|
-
```html
|
|
85
|
+
```html example height="16rem"
|
|
85
86
|
<div class="dropdown">
|
|
86
87
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
87
88
|
<div class="dropdown-menu">
|
|
@@ -100,7 +101,7 @@ Add a dropdown header to group dropdown items into sections and name them accord
|
|
|
100
101
|
|
|
101
102
|
Use icons in your dropdowns to add more visual content and make the options easy to identify for users.
|
|
102
103
|
|
|
103
|
-
```html
|
|
104
|
+
```html example height="16rem"
|
|
104
105
|
<div class="dropdown">
|
|
105
106
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
106
107
|
<div class="dropdown-menu">
|
|
@@ -129,7 +130,7 @@ Use icons in your dropdowns to add more visual content and make the options easy
|
|
|
129
130
|
|
|
130
131
|
Add an arrow that points at the dropdown button.
|
|
131
132
|
|
|
132
|
-
```html
|
|
133
|
+
```html example height="16rem"
|
|
133
134
|
<div class="dropdown">
|
|
134
135
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
135
136
|
<div class="dropdown-menu dropdown-menu-arrow">
|
|
@@ -147,7 +148,7 @@ Add an arrow that points at the dropdown button.
|
|
|
147
148
|
|
|
148
149
|
Add a badge to your dropdown items to show additional information related to an item or distinguish it from other elements.
|
|
149
150
|
|
|
150
|
-
```html
|
|
151
|
+
```html example height="16rem"
|
|
151
152
|
<div class="dropdown">
|
|
152
153
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
153
154
|
<div class="dropdown-menu">
|
|
@@ -167,13 +168,19 @@ Add a badge to your dropdown items to show additional information related to an
|
|
|
167
168
|
|
|
168
169
|
Use dropdowns with checkboxes to allow users to select options from a predefined list. Dropdowns with checkboxes are particularly useful for filtering.
|
|
169
170
|
|
|
170
|
-
```html
|
|
171
|
+
```html example height="16rem"
|
|
171
172
|
<div class="dropdown">
|
|
172
173
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
173
174
|
<div class="dropdown-menu">
|
|
174
|
-
<label class="dropdown-item"
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
<label class="dropdown-item">
|
|
176
|
+
<input class="form-check-input m-0 me-2" type="radio" /> Option 1
|
|
177
|
+
</label>
|
|
178
|
+
<label class="dropdown-item">
|
|
179
|
+
<input class="form-check-input m-0 me-2" type="radio" /> Option 2
|
|
180
|
+
</label>
|
|
181
|
+
<label class="dropdown-item">
|
|
182
|
+
<input class="form-check-input m-0 me-2" type="radio" /> Option 3
|
|
183
|
+
</label>
|
|
177
184
|
</div>
|
|
178
185
|
</div>
|
|
179
186
|
```
|
|
@@ -182,7 +189,7 @@ Use dropdowns with checkboxes to allow users to select options from a predefined
|
|
|
182
189
|
|
|
183
190
|
Make your dropdown suit the dark mode of your website or software.
|
|
184
191
|
|
|
185
|
-
```html
|
|
192
|
+
```html example height="16rem"
|
|
186
193
|
<div class="dropdown">
|
|
187
194
|
<a href="#" class="btn dropdown-toggle" data-bs-toggle="dropdown">Open dropdown</a>
|
|
188
195
|
<div class="dropdown-menu dropdown-menu-arrow bg-dark text-white">
|
|
@@ -221,7 +228,9 @@ Use a dropdown with card content to make it easy for users to get more informati
|
|
|
221
228
|
<img class="card-img-top" src="/samples/photos/friends-at-a-restaurant-drinking-wine.jpg" alt="How do you know she is a witch?" />
|
|
222
229
|
</a>
|
|
223
230
|
<div class="card-body d-flex flex-column">
|
|
224
|
-
<h3 class="card-title"
|
|
231
|
+
<h3 class="card-title">
|
|
232
|
+
<a href="#">How do you know she is a witch?</a>
|
|
233
|
+
</h3>
|
|
225
234
|
<div class="text-secondary">Are you suggesting that coconuts migrate? No, no, no! Yes, yes. A bit. But she's got a wart. You ...</div>
|
|
226
235
|
<div class="d-flex align-items-center pt-4 mt-auto">
|
|
227
236
|
<span class="avatar" style="background-image: url(/samples/avatars/013m.jpg)"></span>
|
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Dropzone
|
|
3
|
-
|
|
4
|
-
description:
|
|
3
|
+
summary: Dropzone is a simple JavaScript library that helps you add file drag and drop functionality to your web forms. It is one of the most popular drag and drop library on the web and is used by millions of people.
|
|
4
|
+
description: Drag-and-drop file upload tool.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Basic usage
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The basic implementation of Dropzone allows you to quickly enable drag-and-drop file uploads on your web forms. By default, it provides a fallback for browsers that don’t support drag-and-drop functionality. Below is an example of how to set up a simple Dropzone form.
|
|
10
|
+
|
|
11
|
+
```html
|
|
10
12
|
<form class="dropzone" id="dropzone-default" action="." autocomplete="off" novalidate>
|
|
11
13
|
<div class="fallback">
|
|
12
14
|
<input name="file" type="file" />
|
|
13
15
|
</div>
|
|
14
16
|
</form>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
To initialize the Dropzone form, you need to create a new instance of the Dropzone class and pass the form element as an argument. Here’s how you can do it:
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
<script
|
|
21
|
+
```html
|
|
22
|
+
<script>
|
|
23
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
24
|
+
new Dropzone("#dropzone-default")
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The Dropzone form will now be active and ready to accept file uploads. When a user drags and drops a file onto the form, the file will be uploaded to the server automatically.
|
|
30
|
+
|
|
31
|
+
```html example vendors height="240px" libs="dropzone" background="surface"
|
|
32
|
+
<form class="dropzone" id="dropzone-default" action="." autocomplete="off" novalidate>
|
|
33
|
+
<div class="fallback">
|
|
34
|
+
<input name="..." type="file" />
|
|
35
|
+
</div>
|
|
36
|
+
</form>
|
|
18
37
|
<script>
|
|
19
38
|
document.addEventListener("DOMContentLoaded", function() {
|
|
20
39
|
new Dropzone("#dropzone-default")
|
|
@@ -24,15 +43,20 @@ description: Dropzone is a simple JavaScript library that helps you add file dra
|
|
|
24
43
|
|
|
25
44
|
## Add multiple files
|
|
26
45
|
|
|
27
|
-
|
|
46
|
+
To allow users to upload multiple files at once, you can enable the `multiple` attribute in the input field. This is particularly useful for applications that require batch uploads, such as image galleries or document management systems. Here’s how to configure Dropzone to accept multiple files:
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<input name="..." type="file" multiple />
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
By adding the `multiple` attribute to the input field, users can select multiple files from their local storage and upload them all at once. The Dropzone form will handle the file uploads automatically.
|
|
53
|
+
|
|
54
|
+
```html example vendors height="240px" libs="dropzone" background="surface"
|
|
28
55
|
<form class="dropzone" id="dropzone-mulitple" action="." autocomplete="off" novalidate>
|
|
29
56
|
<div class="fallback">
|
|
30
57
|
<input name="file" type="file" multiple />
|
|
31
58
|
</div>
|
|
32
59
|
</form>
|
|
33
|
-
|
|
34
|
-
<link href="$TABLER_CDN/dist/libs/dropzone/dist/dropzone.css" rel="stylesheet" />
|
|
35
|
-
<script src="$TABLER_CDN/dist/libs/dropzone/dist/dropzone-min.js"></script>
|
|
36
60
|
<script>
|
|
37
61
|
document.addEventListener("DOMContentLoaded", function() {
|
|
38
62
|
new Dropzone("#dropzone-mulitple")
|
|
@@ -42,7 +66,9 @@ description: Dropzone is a simple JavaScript library that helps you add file dra
|
|
|
42
66
|
|
|
43
67
|
## Custom Dropzone
|
|
44
68
|
|
|
45
|
-
|
|
69
|
+
You can further enhance the user experience by customizing the Dropzone interface. For instance, you can modify the drop area with custom messages or styles to make the file upload process more engaging and user-friendly. Below is an example of a custom Dropzone configuration:
|
|
70
|
+
|
|
71
|
+
```html example vendors height="240px" libs="dropzone" background="surface"
|
|
46
72
|
<form class="dropzone" id="dropzone-custom" action="." autocomplete="off" novalidate>
|
|
47
73
|
<div class="fallback">
|
|
48
74
|
<input name="file" type="file" />
|
|
@@ -52,12 +78,11 @@ description: Dropzone is a simple JavaScript library that helps you add file dra
|
|
|
52
78
|
<span class="dropzone-msg-desc">Your custom description here</span>
|
|
53
79
|
</div>
|
|
54
80
|
</form>
|
|
55
|
-
|
|
56
|
-
<link href="$TABLER_CDN/dist/libs/dropzone/dist/dropzone.css" rel="stylesheet" />
|
|
57
|
-
<script src="$TABLER_CDN/dist/libs/dropzone/dist/dropzone-min.js"></script>
|
|
58
81
|
<script>
|
|
59
82
|
document.addEventListener("DOMContentLoaded", function() {
|
|
60
83
|
new Dropzone("#dropzone-custom")
|
|
61
84
|
})
|
|
62
85
|
</script>
|
|
63
86
|
```
|
|
87
|
+
|
|
88
|
+
By customizing the drop area, you can align the file upload process with your application’s branding or specific requirements.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Empty states
|
|
3
|
-
|
|
3
|
+
summary: Empty states or blank pages are commonly used as placeholders for first-use, empty data or error screens. Their aim is to engage users when there is no content to display and that is why their design is extremely important from the point of view of the user experience of your website or app.
|
|
4
|
+
description: Engage users in empty or error screens.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
## Default markup
|
|
7
8
|
|
|
8
9
|
Use the default empty state to engage users in the critical moments of their experience with your website or app. A good empty state screen should let users know what is happening and what they should do next as well as encourage them to take action.
|
|
9
10
|
|
|
10
|
-
```html
|
|
11
|
+
```html example height="300px"
|
|
11
12
|
<div class="empty">
|
|
12
13
|
<div class="empty-icon">
|
|
13
14
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -39,9 +40,10 @@ Use the default empty state to engage users in the critical moments of their exp
|
|
|
39
40
|
|
|
40
41
|
Make your empty state screen more attractive and engaging by adding an illustration. Thanks to a more personalized design, you will improve your brand image and make your website or app more user friendly.
|
|
41
42
|
|
|
42
|
-
```html
|
|
43
|
+
```html example height="300px"
|
|
43
44
|
<div class="empty">
|
|
44
|
-
<div class="empty-img"
|
|
45
|
+
<div class="empty-img">
|
|
46
|
+
<img src="..." height="128" alt="" />
|
|
45
47
|
</div>
|
|
46
48
|
<p class="empty-title">Invoices are managed from here</p>
|
|
47
49
|
<p class="empty-subtitle text-secondary">
|
|
@@ -94,7 +96,7 @@ Instead of adding an icon or illustration you can simply give the text:
|
|
|
94
96
|
</p>
|
|
95
97
|
<div class="empty-action">
|
|
96
98
|
<a href="#" class="btn btn-primary">
|
|
97
|
-
<!-- SVG icon from http://tabler
|
|
99
|
+
<!-- SVG icon from http://tabler.io/icons/icon/arrow-left -->
|
|
98
100
|
<svg>...</svg>
|
|
99
101
|
Take me home
|
|
100
102
|
</a>
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Icons
|
|
3
|
-
|
|
3
|
+
summary: Use one of over 5000 icons created specifically for Tabler and make your dashboard look even more attractive. All icons are under MIT license, so you can use them without any problem both in private and commercial projects.
|
|
4
4
|
banner: icons
|
|
5
|
+
description: Enhance dashboards with custom icons.
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
If you need to add icons to your website, you can use the Tabler Icons library. It contains over 5000 icons that you can use in your projects. All icons are under the MIT license, so you can use them without any problem both in private and commercial projects. You can find the Tabler Icons library [here](https://tabler-icons.io/).
|
|
9
|
+
|
|
7
10
|
## Base icon
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
To add icon to your code copy the SVG code from the Tabler Icons website and paste it into your HTML file.
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-heart" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
16
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
17
|
+
<path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"></path>
|
|
18
|
+
</svg>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Results can be seen in the example below.
|
|
22
|
+
|
|
23
|
+
```html example centered separated
|
|
10
24
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-heart" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
11
25
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
12
26
|
<path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"></path>
|
|
@@ -39,7 +53,18 @@ banner: icons
|
|
|
39
53
|
|
|
40
54
|
## Filled icons
|
|
41
55
|
|
|
42
|
-
|
|
56
|
+
To use filled icons, you need to copy the SVG code from the Tabler Icons website and paste it into your HTML file.
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-heart-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
60
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
61
|
+
<path d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z" stroke-width="0" fill="currentColor"></path>
|
|
62
|
+
</svg>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Look at the example below to see the filled icons.
|
|
66
|
+
|
|
67
|
+
```html example centered separated
|
|
43
68
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-heart-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
44
69
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
45
70
|
<path d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z" stroke-width="0" fill="currentColor"></path>
|
|
@@ -63,7 +88,18 @@ banner: icons
|
|
|
63
88
|
|
|
64
89
|
## Icon colors
|
|
65
90
|
|
|
66
|
-
|
|
91
|
+
To change the color of the icon, you need to add the `text-` class to the parent element of the icon. Full list of available colors can be found [here](/docs/ui/colors). Color classes can be used with any HTML element.
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<span class="text-red">
|
|
95
|
+
<!-- SVG icon from http://tabler.io/icons/icon/heart -->
|
|
96
|
+
<svg>...</svg>
|
|
97
|
+
</span>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Look at the example below to see how the color of the icon changes.
|
|
101
|
+
|
|
102
|
+
```html example centered separated
|
|
67
103
|
<span class="text-red">
|
|
68
104
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-heart-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
69
105
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
@@ -92,6 +128,19 @@ banner: icons
|
|
|
92
128
|
|
|
93
129
|
## Icon animations
|
|
94
130
|
|
|
131
|
+
To add an animation to the icon, you need to add the `icon-pulse`, `icon-tada`, or `icon-rotate` class to the SVG element.
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<!-- SVG icon from http://tabler.io/icons/icon/heart -->
|
|
135
|
+
<svg class="icon-pulse" ...>...</svg>
|
|
136
|
+
<!-- SVG icon from http://tabler.io/icons/icon/bell -->
|
|
137
|
+
<svg class="icon-tada" ...>...</svg>
|
|
138
|
+
<!-- SVG icon from http://tabler.io/icons/icon/rotate-clockwise -->
|
|
139
|
+
<svg class="icon-rotate" ...>...</svg>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Look at the example below to see the animated icons.
|
|
143
|
+
|
|
95
144
|
```html example centered separated
|
|
96
145
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-pulse" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
97
146
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
@@ -108,13 +157,3 @@ banner: icons
|
|
|
108
157
|
</svg>
|
|
109
158
|
```
|
|
110
159
|
|
|
111
|
-
```html
|
|
112
|
-
<!-- SVG icon from http://tabler-icons.io/i/heart -->
|
|
113
|
-
<svg class="icon-pulse" ...>...</svg>
|
|
114
|
-
|
|
115
|
-
<!-- SVG icon from http://tabler-icons.io/i/bell -->
|
|
116
|
-
<svg class="icon-tada" ...>...</svg>
|
|
117
|
-
|
|
118
|
-
<!-- SVG icon from http://tabler-icons.io/i/rotate-clockwise -->
|
|
119
|
-
<svg class="icon-rotate" ...>...</svg>
|
|
120
|
-
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Components
|
|
3
|
+
order: 4
|
|
4
|
+
description: Various components to enhance UI.
|
|
5
|
+
summary: Tabler UI includes a variety of components to help you build web applications that are both functional and visually appealing. From buttons and cards to modals and navigation, these components provide a wide range of features to enhance your site.
|
|
6
|
+
---
|
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Inline player
|
|
3
3
|
libs: plyr
|
|
4
|
-
|
|
4
|
+
summary: A simple, lightweight, accessible and customizable HTML5, YouTube and Vimeo media player that supports modern browsers.
|
|
5
|
+
description: Lightweight media player for websites.
|
|
5
6
|
---
|
|
6
7
|
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The Inline Player is a versatile, modern media player designed for seamless integration into websites. It supports HTML5, YouTube, and Vimeo content, offering a lightweight and accessible solution for media playback. Built with customization and ease of use in mind, this player ensures compatibility with modern browsers and enhances user experience.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
To use the Inline Player, you need to include the Plyr library in your project. You can install it via npm or include it directly from a CDN. The following example demonstrates how to include the Plyr library from a CDN:
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<script src="$TABLER_CDN/dist/libs/plyr/dist/plyr.min.js"></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
7
21
|
## Sample demo
|
|
8
22
|
|
|
9
|
-
|
|
23
|
+
Integrating the Inline Player into your website is straightforward. Below is a sample implementation for a YouTube video:
|
|
24
|
+
|
|
25
|
+
```html
|
|
10
26
|
<div id="player-youtube" data-plyr-provider="youtube" data-plyr-embed-id="dQw4w9WgXcQ"></div>
|
|
27
|
+
<script>
|
|
28
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
29
|
+
window.Plyr && (new Plyr('#player-youtube'));
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
11
33
|
|
|
34
|
+
Look at the example below to see how the Inline Player works with a YouTube video.
|
|
35
|
+
|
|
36
|
+
```html example vendors height="500px" libs="plyr"
|
|
37
|
+
<div id="player-youtube" data-plyr-provider="youtube" data-plyr-embed-id="dQw4w9WgXcQ"></div>
|
|
12
38
|
<script src="$TABLER_CDN/dist/libs/plyr/dist/plyr.min.js"></script>
|
|
13
39
|
<script>
|
|
14
40
|
document.addEventListener("DOMContentLoaded", function() {
|
|
@@ -19,9 +45,10 @@ description: A simple, lightweight, accessible and customizable HTML5, YouTube a
|
|
|
19
45
|
|
|
20
46
|
## Vimeo file
|
|
21
47
|
|
|
22
|
-
|
|
23
|
-
<div id="player-vimeo" data-plyr-provider="vimeo" data-plyr-embed-id="515937365"></div>
|
|
48
|
+
Here’s how to embed a Vimeo video using the Inline Player:
|
|
24
49
|
|
|
50
|
+
```html example vendors height="500px" libs="plyr"
|
|
51
|
+
<div id="player-vimeo" data-plyr-provider="vimeo" data-plyr-embed-id="515937365"></div>
|
|
25
52
|
<script src="$TABLER_CDN/dist/libs/plyr/dist/plyr.min.js"></script>
|
|
26
53
|
<script>
|
|
27
54
|
document.addEventListener("DOMContentLoaded", function() {
|
|
@@ -1,15 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Modals
|
|
3
|
-
|
|
3
|
+
summary: Use Bootstrap’s JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
|
|
4
|
+
description: Dialogs for notifications and content.
|
|
4
5
|
---
|
|
5
6
|
|
|
7
|
+
Modals are built with HTML, CSS, and JavaScript. They’re positioned over everything else in the document and remove scroll from the `<body>` so that modal content scrolls instead.
|
|
8
|
+
|
|
6
9
|
## Default markup
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
To create a modal, you need to add a `.modal` element to the document. Inside the `.modal`, you need to add a `.modal-dialog` element, which contains a `.modal-content` element. The `.modal-content` element contains the modal’s header, body, and footer.
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<div class="modal" tabindex="-1">
|
|
15
|
+
<div class="modal-dialog" role="document">
|
|
16
|
+
<div class="modal-content">
|
|
17
|
+
<div class="modal-header">
|
|
18
|
+
...
|
|
19
|
+
</div>
|
|
20
|
+
<div class="modal-body">
|
|
21
|
+
...
|
|
22
|
+
</div>
|
|
23
|
+
<div class="modal-footer">
|
|
24
|
+
...
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Look at the example below to see how the modal looks.
|
|
32
|
+
|
|
33
|
+
```html example centered height="30rem"
|
|
9
34
|
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
|
10
35
|
Launch demo modal
|
|
11
36
|
</button>
|
|
12
|
-
|
|
13
37
|
<div class="modal" id="exampleModal" tabindex="-1">
|
|
14
38
|
<div class="modal-dialog" role="document">
|
|
15
39
|
<div class="modal-content">
|
|
@@ -31,11 +55,9 @@ description: Use Bootstrap’s JavaScript modal plugin to add dialogs to your si
|
|
|
31
55
|
|
|
32
56
|
## Prompt and alert
|
|
33
57
|
|
|
34
|
-
|
|
35
|
-
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
|
36
|
-
Launch alert modal
|
|
37
|
-
</button>
|
|
58
|
+
You can use the modal to create a prompt or alert. Look at the example below to see how the prompt and alert look.
|
|
38
59
|
|
|
60
|
+
```html example centered height="30rem"
|
|
39
61
|
<div class="modal" id="exampleModal" tabindex="-1">
|
|
40
62
|
<div class="modal-dialog modal-sm" role="document">
|
|
41
63
|
<div class="modal-content">
|
|
@@ -53,25 +75,31 @@ description: Use Bootstrap’s JavaScript modal plugin to add dialogs to your si
|
|
|
53
75
|
<div class="modal-footer">
|
|
54
76
|
<div class="w-100">
|
|
55
77
|
<div class="row">
|
|
56
|
-
<div class="col"
|
|
78
|
+
<div class="col">
|
|
79
|
+
<a href="#" class="btn w-100" data-bs-dismiss="modal">
|
|
57
80
|
Cancel
|
|
58
|
-
</a
|
|
59
|
-
|
|
81
|
+
</a>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="col">
|
|
84
|
+
<a href="#" class="btn btn-danger w-100" data-bs-dismiss="modal">
|
|
60
85
|
Delete 84 items
|
|
61
|
-
</a
|
|
86
|
+
</a>
|
|
87
|
+
</div>
|
|
62
88
|
</div>
|
|
63
89
|
</div>
|
|
64
90
|
</div>
|
|
65
91
|
</div>
|
|
66
92
|
</div>
|
|
67
93
|
</div>
|
|
94
|
+
<script>
|
|
95
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
96
|
+
var myModal = new bootstrap.Modal(document.getElementById('exampleModal'))
|
|
97
|
+
myModal.show()
|
|
98
|
+
})
|
|
99
|
+
</script>
|
|
68
100
|
```
|
|
69
101
|
|
|
70
|
-
```html example
|
|
71
|
-
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
|
72
|
-
Launch demo modal
|
|
73
|
-
</button>
|
|
74
|
-
|
|
102
|
+
```html example centered height="30rem"
|
|
75
103
|
<div class="modal" id="exampleModal" tabindex="-1">
|
|
76
104
|
<div class="modal-dialog modal-sm" role="document">
|
|
77
105
|
<div class="modal-content">
|
|
@@ -105,15 +133,22 @@ description: Use Bootstrap’s JavaScript modal plugin to add dialogs to your si
|
|
|
105
133
|
</div>
|
|
106
134
|
</div>
|
|
107
135
|
</div>
|
|
136
|
+
<script>
|
|
137
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
138
|
+
var myModal = new bootstrap.Modal(document.getElementById('exampleModal'))
|
|
139
|
+
myModal.show()
|
|
140
|
+
})
|
|
141
|
+
</script>
|
|
108
142
|
```
|
|
109
143
|
|
|
110
144
|
## Modal with form
|
|
111
145
|
|
|
112
|
-
|
|
146
|
+
You can use the modal to create a form. Look at the example below to see how the form looks.
|
|
147
|
+
|
|
148
|
+
```html example centered height="30rem"
|
|
113
149
|
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
|
|
114
150
|
Launch modal with form
|
|
115
151
|
</button>
|
|
116
|
-
|
|
117
152
|
<div class="modal" id="exampleModal" tabindex="-1">
|
|
118
153
|
<div class="modal-dialog modal-lg" role="document">
|
|
119
154
|
<div class="modal-content">
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Offcanvas
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Offcanvas is a sidebar component that can be toggled via JavaScript to appear from the left, right, top, or bottom edge of the viewport. Buttons or anchors are used as triggers that are attached to specific elements you toggle, and `data` attributes are used to invoke our JavaScript.
|
|
6
|
+
|
|
7
|
+
## Basic usage
|
|
8
|
+
|
|
9
|
+
To create an offcanvas, add the `.offcanvas` class to a container element. You can also add the `.offcanvas-start`, `.offcanvas-end`, `.offcanvas-top`, or `.offcanvas-bottom` class to specify the position of the offcanvas. The `.show` class is used to display the offcanvas.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvas">
|
|
13
|
+
<div class="offcanvas-body">
|
|
14
|
+
Content for the offcanvas goes here. You can place just about any Tabler component or custom elements here.
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Look at the example below to see how the offcanvas works.
|
|
20
|
+
|
|
21
|
+
```html example vendors height="25rem"
|
|
22
|
+
<div class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
|
|
23
|
+
<div class="offcanvas-body">
|
|
24
|
+
Content for the offcanvas goes here. You can place just about any Tabler component or custom elements here.
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Cookies banner
|
|
30
|
+
|
|
31
|
+
The offcanvas component is used to display a cookies banner. It is a great way to inform users about the use of cookies on your website and to get their consent.
|
|
32
|
+
|
|
33
|
+
```html example vendors height="25rem"
|
|
34
|
+
<div class="offcanvas offcanvas-bottom h-auto show" tabindex="-1" id="offcanvasBottom" aria-modal="true" role="dialog">
|
|
35
|
+
<div class="offcanvas-body">
|
|
36
|
+
<div class="container">
|
|
37
|
+
<div class="row align-items-center">
|
|
38
|
+
<div class="col">
|
|
39
|
+
<strong>Do you like cookies?</strong> 🍪 We use cookies to ensure you get the best experience on our website. <a href="./terms-of-service.html" target="_blank">Learn more</a>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="col-auto">
|
|
42
|
+
<button type="button" class="btn btn-primary" data-bs-dismiss="offcanvas">
|
|
43
|
+
Essential Cookies Only
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="col-auto">
|
|
47
|
+
<button type="button" class="btn btn-primary" data-bs-dismiss="offcanvas">
|
|
48
|
+
Allow All Cookies
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
```
|