@tabler/core 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/css/tabler-flags.css +2 -2
- package/dist/css/tabler-flags.css.map +1 -1
- package/dist/css/tabler-flags.min.css +2 -2
- package/dist/css/tabler-flags.min.css.map +1 -1
- package/dist/css/tabler-flags.rtl.css +2 -2
- package/dist/css/tabler-flags.rtl.css.map +1 -1
- package/dist/css/tabler-flags.rtl.min.css +2 -2
- package/dist/css/tabler-flags.rtl.min.css.map +1 -1
- package/dist/css/tabler-marketing.css +6 -6
- package/dist/css/tabler-marketing.css.map +1 -1
- package/dist/css/tabler-marketing.min.css +2 -2
- package/dist/css/tabler-marketing.min.css.map +1 -1
- package/dist/css/tabler-marketing.rtl.css +6 -6
- package/dist/css/tabler-marketing.rtl.css.map +1 -1
- package/dist/css/tabler-marketing.rtl.min.css +2 -2
- package/dist/css/tabler-marketing.rtl.min.css.map +1 -1
- package/dist/css/tabler-payments.css +1 -1
- package/dist/css/tabler-payments.min.css +1 -1
- package/dist/css/tabler-payments.rtl.css +1 -1
- package/dist/css/tabler-payments.rtl.min.css +1 -1
- package/dist/css/tabler-props.css +448 -0
- package/dist/css/tabler-props.css.map +1 -0
- package/dist/css/tabler-props.min.css +8 -0
- package/dist/css/tabler-props.min.css.map +1 -0
- package/dist/css/tabler-props.rtl.css +447 -0
- package/dist/css/tabler-props.rtl.css.map +1 -0
- package/dist/css/tabler-props.rtl.min.css +8 -0
- package/dist/css/tabler-props.rtl.min.css.map +1 -0
- package/dist/css/tabler-socials.css +1 -1
- package/dist/css/tabler-socials.min.css +1 -1
- package/dist/css/tabler-socials.rtl.css +1 -1
- package/dist/css/tabler-socials.rtl.min.css +1 -1
- package/dist/css/tabler-themes.css +213 -0
- package/dist/css/tabler-themes.css.map +1 -0
- package/dist/css/tabler-themes.min.css +8 -0
- package/dist/css/tabler-themes.min.css.map +1 -0
- package/dist/css/tabler-themes.rtl.css +212 -0
- package/dist/css/tabler-themes.rtl.css.map +1 -0
- package/dist/css/tabler-themes.rtl.min.css +8 -0
- package/dist/css/tabler-themes.rtl.min.css.map +1 -0
- package/dist/css/tabler-vendors.css +31 -16
- package/dist/css/tabler-vendors.css.map +1 -1
- package/dist/css/tabler-vendors.min.css +2 -2
- package/dist/css/tabler-vendors.min.css.map +1 -1
- package/dist/css/tabler-vendors.rtl.css +31 -16
- package/dist/css/tabler-vendors.rtl.css.map +1 -1
- package/dist/css/tabler-vendors.rtl.min.css +2 -2
- package/dist/css/tabler-vendors.rtl.min.css.map +1 -1
- package/dist/css/tabler.css +7662 -8392
- package/dist/css/tabler.css.map +1 -1
- package/dist/css/tabler.min.css +2 -2
- package/dist/css/tabler.min.css.map +1 -1
- package/dist/css/tabler.rtl.css +7751 -8481
- package/dist/css/tabler.rtl.css.map +1 -1
- package/dist/css/tabler.rtl.min.css +2 -2
- package/dist/css/tabler.rtl.min.css.map +1 -1
- package/dist/img/flags/kr.svg +1 -1
- package/dist/js/tabler-theme.esm.js +38 -0
- package/dist/js/tabler-theme.esm.js.map +1 -0
- package/dist/js/tabler-theme.esm.min.js +8 -0
- package/dist/js/tabler-theme.esm.min.js.map +1 -0
- package/dist/js/tabler-theme.js +45 -0
- package/dist/js/tabler-theme.js.map +1 -0
- package/dist/js/tabler-theme.min.js +8 -0
- package/dist/js/tabler-theme.min.js.map +1 -0
- package/dist/js/tabler.esm.js +28 -21
- package/dist/js/tabler.esm.js.map +1 -1
- package/dist/js/tabler.esm.min.js +5 -5
- package/dist/js/tabler.esm.min.js.map +1 -1
- package/dist/js/tabler.js +36 -24
- package/dist/js/tabler.js.map +1 -1
- package/dist/js/tabler.min.js +5 -5
- package/dist/js/tabler.min.js.map +1 -1
- package/js/src/autosize.js +1 -4
- package/js/src/input-mask.js +1 -3
- package/js/tabler-theme.js +35 -0
- package/js/{tabler.esm.js → tabler.js} +16 -0
- package/package.json +10 -8
- package/scss/_bootstrap-components.scss +0 -5
- package/scss/_core.scss +4 -0
- package/scss/_props.scss +91 -0
- package/scss/_utilities.scss +30 -1
- package/scss/_variables-dark.scss +1 -1
- package/scss/_variables.scss +79 -60
- package/scss/helpers/_index.scss +143 -0
- package/scss/layout/_core.scss +1 -0
- package/scss/layout/_dark.scss +33 -38
- package/scss/layout/_navbar.scss +2 -1
- package/scss/layout/_page.scss +1 -0
- package/scss/layout/_root.scss +26 -34
- package/scss/marketing/_core.scss +1 -1
- package/scss/marketing/_pricing.scss +1 -1
- package/scss/mixins/_mixins.scss +6 -6
- package/scss/tabler-props.scss +1 -0
- package/scss/tabler-themes.scss +121 -0
- package/scss/tabler-vendors.scss +3 -1
- package/scss/tabler.scss +0 -1
- package/scss/ui/_accordion.scss +31 -26
- package/scss/ui/_alerts.scss +19 -8
- package/scss/ui/_avatars.scss +35 -9
- package/scss/ui/_badges.scss +1 -1
- package/scss/ui/_buttons.scss +15 -17
- package/scss/ui/_close.scss +55 -2
- package/scss/ui/_dropdowns.scss +1 -0
- package/scss/ui/_forms.scss +12 -2
- package/scss/ui/_markdown.scss +10 -1
- package/scss/ui/_nav.scss +11 -1
- package/scss/ui/_offcanvas.scss +1 -1
- package/scss/ui/_pagination.scss +2 -0
- package/scss/ui/_signature.scss +4 -2
- package/scss/ui/_steps.scss +4 -0
- package/scss/ui/_tables.scss +16 -0
- package/scss/ui/_tags.scss +1 -1
- package/scss/ui/_type.scss +69 -7
- package/scss/ui/forms/_form-colorinput.scss +1 -1
- package/scss/ui/forms/_form-imagecheck.scss +6 -5
- package/scss/ui/forms/_form-selectgroup.scss +1 -1
- package/scss/utils/_colors.scss +58 -11
- package/scss/utils/_scroll.scss +0 -2
- package/scss/vendor/_coloris.scss +6 -1
- package/scss/vendor/_fslightbox.scss +1 -1
- package/scss/vendor/_jsvectormap.scss +2 -3
- package/scss/vendor/_litepicker.scss +1 -0
- package/scss/vendor/_nouislider.scss +0 -2
- package/scss/vendor/_tinymce.scss +3 -3
- package/scss/vendor/_tom-select.scss +7 -4
- package/scss/vendor/_turbo.scss +3 -0
- package/scss/vendor/_wysiwyg.scss +34 -0
- package/docs/emails/index.mdx +0 -14
- package/docs/emails/introduction/compiled-html.mdx +0 -29
- package/docs/emails/introduction/contents.mdx +0 -63
- package/docs/emails/introduction/index.mdx +0 -9
- package/docs/emails/introduction/source-html.mdx +0 -26
- package/docs/icons/index.mdx +0 -13
- package/docs/icons/libraries/index.mdx +0 -5
- package/docs/icons/libraries/preact.mdx +0 -42
- package/docs/icons/libraries/react.mdx +0 -42
- package/docs/icons/libraries/solidjs.mdx +0 -42
- package/docs/icons/libraries/svelte.mdx +0 -43
- package/docs/icons/libraries/vue.mdx +0 -50
- package/docs/icons/libraries/webfont.mdx +0 -60
- package/docs/icons/plugins/figma.mdx +0 -15
- package/docs/icons/plugins/index.mdx +0 -4
- package/docs/icons/static-files/eps.mdx +0 -15
- package/docs/icons/static-files/index.mdx +0 -5
- package/docs/icons/static-files/pdf.mdx +0 -15
- package/docs/icons/static-files/png.mdx +0 -31
- package/docs/icons/static-files/svg.mdx +0 -85
- package/docs/illustrations/index.mdx +0 -8
- package/docs/illustrations/introduction/contents.mdx +0 -77
- package/docs/illustrations/introduction/customization.mdx +0 -1198
- package/docs/illustrations/introduction/index.mdx +0 -5
- package/docs/illustrations/introduction/license.mdx +0 -90
- package/docs/img/browsers/brave.svg +0 -1
- package/docs/img/browsers/chrome.svg +0 -1
- package/docs/img/browsers/edge.svg +0 -1
- package/docs/img/browsers/electron.svg +0 -1
- package/docs/img/browsers/firefox.svg +0 -1
- package/docs/img/browsers/internet-explorer.svg +0 -1
- package/docs/img/browsers/opera.svg +0 -1
- package/docs/img/browsers/safari.svg +0 -1
- package/docs/img/browsers/vivaldi.svg +0 -1
- 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 +0 -16
- package/docs/ui/base/colors.mdx +0 -83
- package/docs/ui/base/index.mdx +0 -6
- package/docs/ui/base/typography.mdx +0 -311
- package/docs/ui/components/alerts.mdx +0 -406
- package/docs/ui/components/autosize.mdx +0 -25
- package/docs/ui/components/avatars.mdx +0 -227
- package/docs/ui/components/badges.mdx +0 -112
- package/docs/ui/components/breadcrumb.mdx +0 -199
- package/docs/ui/components/buttons.mdx +0 -1213
- package/docs/ui/components/cards.mdx +0 -417
- package/docs/ui/components/carousel.mdx +0 -459
- package/docs/ui/components/charts.mdx +0 -697
- package/docs/ui/components/countup.mdx +0 -165
- package/docs/ui/components/datagrid.mdx +0 -120
- package/docs/ui/components/divider.mdx +0 -68
- package/docs/ui/components/dropdowns.mdx +0 -302
- package/docs/ui/components/dropzone.mdx +0 -88
- package/docs/ui/components/empty.mdx +0 -149
- package/docs/ui/components/icons.mdx +0 -392
- package/docs/ui/components/index.mdx +0 -6
- package/docs/ui/components/inline-player.mdx +0 -58
- package/docs/ui/components/modals.mdx +0 -297
- package/docs/ui/components/offcanvas.mdx +0 -70
- package/docs/ui/components/placeholder.mdx +0 -273
- package/docs/ui/components/popover.mdx +0 -142
- package/docs/ui/components/progress.mdx +0 -241
- package/docs/ui/components/range-slider.mdx +0 -32
- package/docs/ui/components/ribbons.mdx +0 -207
- package/docs/ui/components/segmented-control.mdx +0 -401
- package/docs/ui/components/spinners.mdx +0 -135
- package/docs/ui/components/statuses.mdx +0 -322
- package/docs/ui/components/steps.mdx +0 -174
- package/docs/ui/components/switch-icon.mdx +0 -386
- package/docs/ui/components/tables.mdx +0 -397
- package/docs/ui/components/tabs.mdx +0 -396
- package/docs/ui/components/timelines.mdx +0 -697
- package/docs/ui/components/tinymce.mdx +0 -46
- package/docs/ui/components/toasts.mdx +0 -126
- package/docs/ui/components/tooltips.mdx +0 -65
- package/docs/ui/components/tracking.mdx +0 -548
- package/docs/ui/components/vector-maps.mdx +0 -166
- package/docs/ui/forms/form-color-check.mdx +0 -220
- package/docs/ui/forms/form-elements.mdx +0 -632
- package/docs/ui/forms/form-fieldset.mdx +0 -45
- package/docs/ui/forms/form-helpers.mdx +0 -91
- package/docs/ui/forms/form-image-check.mdx +0 -213
- package/docs/ui/forms/form-input-mask.mdx +0 -61
- package/docs/ui/forms/form-selectboxes.mdx +0 -398
- package/docs/ui/forms/form-validation.mdx +0 -62
- package/docs/ui/forms/index.mdx +0 -6
- package/docs/ui/getting-started/browser-support.mdx +0 -28
- package/docs/ui/getting-started/customize.mdx +0 -28
- package/docs/ui/getting-started/download.mdx +0 -44
- package/docs/ui/getting-started/faq.mdx +0 -30
- package/docs/ui/getting-started/how-to-contribute.mdx +0 -84
- package/docs/ui/getting-started/index.mdx +0 -16
- package/docs/ui/getting-started/installation.mdx +0 -67
- package/docs/ui/getting-started/license.mdx +0 -30
- package/docs/ui/index.mdx +0 -8
- package/docs/ui/layout/index.mdx +0 -6
- package/docs/ui/layout/navbars.mdx +0 -164
- package/docs/ui/layout/navs-tabls.mdx +0 -201
- package/docs/ui/layout/page-headers.mdx +0 -365
- package/docs/ui/layout/page-layouts.mdx +0 -213
- package/docs/ui/plugins/flags.mdx +0 -316
- package/docs/ui/plugins/index.mdx +0 -6
- package/docs/ui/plugins/payments.mdx +0 -152
- package/docs/ui/plugins/social-icons.mdx +0 -135
- package/docs/ui/utilities/borders.mdx +0 -260
- package/docs/ui/utilities/cursors.mdx +0 -63
- package/docs/ui/utilities/index.mdx +0 -5
- package/docs/ui/utilities/interactions.mdx +0 -26
- package/docs/ui/utilities/margins.mdx +0 -234
- package/docs/ui/utilities/vertical-align.mdx +0 -66
- package/docs/ui/utilities/visually-hidden.mdx +0 -12
- package/js/tabler.umd.js +0 -15
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Form helpers
|
|
3
|
-
summary: Use form helpers to provide additional information about a form element. You can use input help, required field, form hint, and additional info inside the label.
|
|
4
|
-
description: Provide additional guidance in forms.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Input help
|
|
8
|
-
|
|
9
|
-
Use an input helper to display additional information about a form element. The text label will appear once a user hovers over the helper. To add an input helper, use the `.form-help` class.
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<span
|
|
13
|
-
class="form-help"
|
|
14
|
-
data-bs-toggle="popover"
|
|
15
|
-
data-bs-placement="top"
|
|
16
|
-
data-bs-html="true"
|
|
17
|
-
data-bs-content="<p>...</p>"
|
|
18
|
-
>?</span
|
|
19
|
-
>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Look at the example below to see how the input help works:
|
|
23
|
-
|
|
24
|
-
```html example centered height="25rem" columns={1}
|
|
25
|
-
<div>
|
|
26
|
-
<label class="form-label">
|
|
27
|
-
ZIP Code
|
|
28
|
-
<span
|
|
29
|
-
class="form-help"
|
|
30
|
-
data-bs-toggle="popover"
|
|
31
|
-
data-bs-placement="top"
|
|
32
|
-
data-bs-html="true"
|
|
33
|
-
data-bs-content="<p>ZIP Code must be US or CDN format. You can use an extended ZIP+4 code to determine address more accurately.</p><p class='mb-0'><a href=''>USP ZIP codes lookup tools</a></p>"
|
|
34
|
-
>?</span
|
|
35
|
-
>
|
|
36
|
-
</label>
|
|
37
|
-
<input type="text" class="form-control" placeholder="Your ZIP Code" />
|
|
38
|
-
</div>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Required field
|
|
42
|
-
|
|
43
|
-
Use the `.required` class to indicate that a field is required. It will add a red asterisk to the label.
|
|
44
|
-
|
|
45
|
-
```html
|
|
46
|
-
<label class="form-label required">Required</label>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Look at the example below to see how the required field works:
|
|
50
|
-
|
|
51
|
-
```html example centered columns={1}
|
|
52
|
-
<div>
|
|
53
|
-
<label class="form-label required">Required</label>
|
|
54
|
-
<input type="text" class="form-control" name="..." placeholder="Required..." />
|
|
55
|
-
</div>
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Form hint
|
|
59
|
-
|
|
60
|
-
Use a form hint to provide users with additional information about a form element. The text will appear below the input field. To add a form hint, use the `.form-hint` class.
|
|
61
|
-
|
|
62
|
-
```html
|
|
63
|
-
<div class="form-hint">We'll never share your email with anyone else.</div>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Look at the example below to see how the form hint works:
|
|
67
|
-
|
|
68
|
-
```html example centered columns={1}
|
|
69
|
-
<div>
|
|
70
|
-
<label class="form-label">Email address</label>
|
|
71
|
-
<input type="email" class="form-control" placeholder="Enter your email address" />
|
|
72
|
-
<div class="form-hint">We'll never share your email with anyone else.</div>
|
|
73
|
-
</div>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Additional info inside label
|
|
77
|
-
|
|
78
|
-
Use the `.form-label-description` class to add additional information to the label. The text will appear next to the label. You can use it to add for example a character counter.
|
|
79
|
-
|
|
80
|
-
```html
|
|
81
|
-
<label class="form-label">Textarea <span class="form-label-description">56/100</span> </label>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
This example shows how to use the additional info inside the label:
|
|
85
|
-
|
|
86
|
-
```html example centered columns={1} height="15rem"
|
|
87
|
-
<div>
|
|
88
|
-
<label class="form-label">Textarea <span class="form-label-description">56/100</span> </label>
|
|
89
|
-
<textarea class="form-control" name="" rows="3" placeholder="Content.."></textarea>
|
|
90
|
-
</div>
|
|
91
|
-
```
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Image check
|
|
3
|
-
summary: The image check is a great way to make your form more user-friendly and engaging. You can use the image check to create a visually appealing form that will help users make decisions quickly and easily.
|
|
4
|
-
description: Add visual appeal to forms with images.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Default markup
|
|
8
|
-
|
|
9
|
-
To build an image check, you need to use the `.form-imagecheck` class and the `.form-imagecheck-input` class for the input element. You can also use the `.form-imagecheck-figure` class to display the custom checkbox and the `.form-imagecheck-image` class to style the image itself.
|
|
10
|
-
|
|
11
|
-
```html
|
|
12
|
-
<label class="form-imagecheck">
|
|
13
|
-
<input name="..." type="checkbox" value="" class="form-imagecheck-input" checked />
|
|
14
|
-
<span class="form-imagecheck-figure">
|
|
15
|
-
<img src="..." alt="" class="form-imagecheck-image" />
|
|
16
|
-
</span>
|
|
17
|
-
</label>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Look at the examples below to see how the image check works:
|
|
21
|
-
|
|
22
|
-
```html example centered columns="2" height="15rem"
|
|
23
|
-
<div class="mb-3">
|
|
24
|
-
<label class="form-label">Image Check</label>
|
|
25
|
-
<div class="row g-2">
|
|
26
|
-
<div class="col-3">
|
|
27
|
-
<label class="form-imagecheck">
|
|
28
|
-
<input name="image" type="checkbox" value="1" class="form-imagecheck-input" />
|
|
29
|
-
<span class="form-imagecheck-figure">
|
|
30
|
-
<img
|
|
31
|
-
src="/samples/photos/everything-you-need-to-work-from-your-bed-2.jpg"
|
|
32
|
-
alt=""
|
|
33
|
-
class="form-imagecheck-image"
|
|
34
|
-
/>
|
|
35
|
-
</span>
|
|
36
|
-
</label>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="col-3">
|
|
39
|
-
<label class="form-imagecheck">
|
|
40
|
-
<input name="image" type="checkbox" value="2" class="form-imagecheck-input" checked />
|
|
41
|
-
<span class="form-imagecheck-figure">
|
|
42
|
-
<img
|
|
43
|
-
src="/samples/photos/color-palette-guide-sample-colors-catalog-.jpg"
|
|
44
|
-
alt=""
|
|
45
|
-
class="form-imagecheck-image"
|
|
46
|
-
/>
|
|
47
|
-
</span>
|
|
48
|
-
</label>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="col-3">
|
|
51
|
-
<label class="form-imagecheck">
|
|
52
|
-
<input name="image" type="checkbox" value="3" class="form-imagecheck-input" />
|
|
53
|
-
<span class="form-imagecheck-figure">
|
|
54
|
-
<img
|
|
55
|
-
src="/samples/photos/woman-read-book-and-drink-coffee-2.jpg"
|
|
56
|
-
alt=""
|
|
57
|
-
class="form-imagecheck-image"
|
|
58
|
-
/>
|
|
59
|
-
</span>
|
|
60
|
-
</label>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="col-3">
|
|
63
|
-
<label class="form-imagecheck">
|
|
64
|
-
<input name="image" type="checkbox" value="4" class="form-imagecheck-input" checked />
|
|
65
|
-
<span class="form-imagecheck-figure">
|
|
66
|
-
<img
|
|
67
|
-
src="/samples/photos/stylish-workspace-with-macbook-pro-2.jpg"
|
|
68
|
-
alt=""
|
|
69
|
-
class="form-imagecheck-image"
|
|
70
|
-
/>
|
|
71
|
-
</span>
|
|
72
|
-
</label>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Radio buttons
|
|
79
|
-
|
|
80
|
-
If you want to use the image check as a radio button, you can change the input type to `radio`.
|
|
81
|
-
|
|
82
|
-
```html example centered columns="2" height="15rem"
|
|
83
|
-
<div class="mb-3">
|
|
84
|
-
<label class="form-label">Image Check Radio</label>
|
|
85
|
-
<div class="row g-2">
|
|
86
|
-
<div class="col-3">
|
|
87
|
-
<label class="form-imagecheck mb-2">
|
|
88
|
-
<input name="image" type="radio" value="1" class="form-imagecheck-input" />
|
|
89
|
-
<span class="form-imagecheck-figure">
|
|
90
|
-
<img
|
|
91
|
-
src="/samples/photos/woman-drinking-hot-tea-in-her-home-office.jpg"
|
|
92
|
-
alt=""
|
|
93
|
-
class="form-imagecheck-image"
|
|
94
|
-
/>
|
|
95
|
-
</span>
|
|
96
|
-
</label>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="col-3">
|
|
99
|
-
<label class="form-imagecheck mb-2">
|
|
100
|
-
<input name="image" type="radio" value="2" class="form-imagecheck-input" checked />
|
|
101
|
-
<span class="form-imagecheck-figure">
|
|
102
|
-
<img
|
|
103
|
-
src="/samples/photos/young-woman-sitting-on-the-sofa-and-working-on-her-laptop-3.jpg"
|
|
104
|
-
alt=""
|
|
105
|
-
class="form-imagecheck-image"
|
|
106
|
-
/>
|
|
107
|
-
</span>
|
|
108
|
-
</label>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="col-3">
|
|
111
|
-
<label class="form-imagecheck mb-2">
|
|
112
|
-
<input name="image" type="radio" value="3" class="form-imagecheck-input" />
|
|
113
|
-
<span class="form-imagecheck-figure">
|
|
114
|
-
<img
|
|
115
|
-
src="/samples/photos/beautiful-blonde-woman-relaxing-with-a-can-of-coke-on-a-tree-stump-by-the-beach.jpg"
|
|
116
|
-
alt=""
|
|
117
|
-
class="form-imagecheck-image"
|
|
118
|
-
/>
|
|
119
|
-
</span>
|
|
120
|
-
</label>
|
|
121
|
-
</div>
|
|
122
|
-
<div class="col-3">
|
|
123
|
-
<label class="form-imagecheck mb-2">
|
|
124
|
-
<input name="image" type="radio" value="4" class="form-imagecheck-input" checked />
|
|
125
|
-
<span class="form-imagecheck-figure">
|
|
126
|
-
<img src="/samples/photos/book-on-the-grass.jpg" alt="" class="form-imagecheck-image" />
|
|
127
|
-
</span>
|
|
128
|
-
</label>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
```html
|
|
135
|
-
<label class="form-imagecheck">
|
|
136
|
-
<input name="..." type="radio" value="1" class="form-imagecheck-input" />
|
|
137
|
-
<span class="form-imagecheck-figure">
|
|
138
|
-
<img src="..." alt="" class="form-imagecheck-image" />
|
|
139
|
-
</span>
|
|
140
|
-
</label>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Avatars
|
|
144
|
-
|
|
145
|
-
If you want to use the image check with avatars, you can use an [avatar component](/docs/ui/components/avatars) instead of an image.
|
|
146
|
-
|
|
147
|
-
```html example centered columns={2} height="15rem"
|
|
148
|
-
<div class="mb-3">
|
|
149
|
-
<label class="form-label">Person Check</label>
|
|
150
|
-
<div class="row g-2">
|
|
151
|
-
<div class="col-auto">
|
|
152
|
-
<label class="form-imagecheck mb-2">
|
|
153
|
-
<input name="image" type="checkbox" value="1" class="form-imagecheck-input" />
|
|
154
|
-
<span class="form-imagecheck-figure">
|
|
155
|
-
<span class="form-imagecheck-image">
|
|
156
|
-
<span
|
|
157
|
-
class="avatar avatar-xl"
|
|
158
|
-
style="background-image: url(/samples/avatars/057f.jpg)"
|
|
159
|
-
></span>
|
|
160
|
-
</span>
|
|
161
|
-
</span>
|
|
162
|
-
</label>
|
|
163
|
-
</div>
|
|
164
|
-
<div class="col-auto">
|
|
165
|
-
<label class="form-imagecheck mb-2">
|
|
166
|
-
<input name="image" type="checkbox" value="2" class="form-imagecheck-input" checked />
|
|
167
|
-
<span class="form-imagecheck-figure">
|
|
168
|
-
<span class="form-imagecheck-image">
|
|
169
|
-
<span class="avatar avatar-xl">HS</span>
|
|
170
|
-
</span>
|
|
171
|
-
</span>
|
|
172
|
-
</label>
|
|
173
|
-
</div>
|
|
174
|
-
<div class="col-auto">
|
|
175
|
-
<label class="form-imagecheck mb-2">
|
|
176
|
-
<input name="image" type="checkbox" value="3" class="form-imagecheck-input" />
|
|
177
|
-
<span class="form-imagecheck-figure">
|
|
178
|
-
<span class="form-imagecheck-image">
|
|
179
|
-
<span
|
|
180
|
-
class="avatar avatar-xl"
|
|
181
|
-
style="background-image: url(/samples/avatars/062m.jpg)"
|
|
182
|
-
></span>
|
|
183
|
-
</span>
|
|
184
|
-
</span>
|
|
185
|
-
</label>
|
|
186
|
-
</div>
|
|
187
|
-
<div class="col-auto">
|
|
188
|
-
<label class="form-imagecheck mb-2">
|
|
189
|
-
<input name="image" type="checkbox" value="4" class="form-imagecheck-input" checked />
|
|
190
|
-
<span class="form-imagecheck-figure">
|
|
191
|
-
<span class="form-imagecheck-image">
|
|
192
|
-
<span
|
|
193
|
-
class="avatar avatar-xl"
|
|
194
|
-
style="background-image: url(/samples/avatars/070m.jpg)"
|
|
195
|
-
></span>
|
|
196
|
-
</span>
|
|
197
|
-
</span>
|
|
198
|
-
</label>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
```html
|
|
205
|
-
<label class="form-imagecheck">
|
|
206
|
-
<input name="..." type="checkbox" value="..." class="form-imagecheck-input" />
|
|
207
|
-
<span class="form-imagecheck-figure">
|
|
208
|
-
<span class="form-imagecheck-image">
|
|
209
|
-
<span class="avatar avatar-md" style="background-image: url(...)"></span>
|
|
210
|
-
</span>
|
|
211
|
-
</span>
|
|
212
|
-
</label>
|
|
213
|
-
```
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Input mask
|
|
3
|
-
summary: An input mask is used to clarify the input format required in a given field and is helpful for users, removing confusion and reducing the number of validation errors.
|
|
4
|
-
description: Clarify input formats for users.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
To be able to use the input mask in your application you will need to install the imask dependency. You can do this by running the following command:
|
|
10
|
-
|
|
11
|
-
<TabsPackage name="imask" />
|
|
12
|
-
|
|
13
|
-
And import or require:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import IMask from 'imask';
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
You can also use the CDN link to include the script in your project:
|
|
20
|
-
|
|
21
|
-
```html
|
|
22
|
-
<script src="https://cdn.jsdelivr.net/npm/imask"></script>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
If you struggle with the installation, you can find more information in the [IMask documentation](https://imask.js.org/guide.html#installation).
|
|
26
|
-
|
|
27
|
-
## Default markup
|
|
28
|
-
|
|
29
|
-
Use an input mask in the fields where users have to enter their phone number, to make the formatting rules clear and help them avoid confusion.
|
|
30
|
-
|
|
31
|
-
To create an input mask, add the `data-mask` attribute to the input element:
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
<input
|
|
35
|
-
type="text"
|
|
36
|
-
name="input-mask"
|
|
37
|
-
class="form-control"
|
|
38
|
-
data-mask="(00) 0000-0000"
|
|
39
|
-
placeholder="(00) 0000-0000"
|
|
40
|
-
autocomplete="off"
|
|
41
|
-
/>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Look at the example below to see how the input mask works:
|
|
45
|
-
|
|
46
|
-
```html example centered columns={1}
|
|
47
|
-
<label class="form-label">Telephone mask</label>
|
|
48
|
-
<input
|
|
49
|
-
type="text"
|
|
50
|
-
name="input-mask"
|
|
51
|
-
class="form-control"
|
|
52
|
-
data-mask="(00) 0000-0000"
|
|
53
|
-
data-mask-visible="true"
|
|
54
|
-
placeholder="(00) 0000-0000"
|
|
55
|
-
autocomplete="off"
|
|
56
|
-
/>
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## More examples
|
|
60
|
-
|
|
61
|
-
If you need more examples of input masks, you can find them in the [IMask documentation](https://imask.js.org/guide.html#masked-input).
|