@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,22 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Form elements
|
|
3
|
-
|
|
3
|
+
summary: Forms are one of the most important types of interaction with a website or app. Since their aim is to enable users to make a purchase, subscribe to a service or sign up to create an account, it's important to make sure they are easy to complete and help increase conversion rates. Use the available elements to create forms which are well-structured and user-friendly.
|
|
4
4
|
bootstrapLink: components/forms/
|
|
5
5
|
libs: nouislider
|
|
6
|
+
description: Design user-friendly and effective forms.
|
|
7
|
+
order: 1
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
## Classic inputs
|
|
9
11
|
|
|
10
|
-
Use classic, user-friendly inputs, label them appropriately and include input placeholders that will help users avoid confusion when completing a form.
|
|
12
|
+
Use classic, user-friendly inputs, label them appropriately and include input placeholders that will help users avoid confusion when completing a form. Add the `form-control` class to style your input controls.
|
|
11
13
|
|
|
12
|
-
```html
|
|
14
|
+
```html
|
|
15
|
+
<input type="text" class="form-control" name="example-text-input" placeholder="Input placeholder" />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
All variants of the input control are available in the examples below:
|
|
19
|
+
|
|
20
|
+
```html example columns={1} height="25rem"
|
|
13
21
|
<div class="mb-3">
|
|
14
22
|
<label class="form-label">Text</label>
|
|
15
23
|
<input type="text" class="form-control" name="example-text-input" placeholder="Input placeholder" />
|
|
16
24
|
</div>
|
|
17
25
|
<div class="mb-3">
|
|
18
26
|
<label class="form-label">Password</label>
|
|
19
|
-
<input type="
|
|
27
|
+
<input type="password" class="form-control" name="example-password-input" placeholder="Input placeholder" />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="mb-3">
|
|
30
|
+
<label class="form-label">Disabled</label>
|
|
31
|
+
<input type="text" class="form-control" name="example-password-input" placeholder="Input placeholder" disabled />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="mb-3">
|
|
34
|
+
<label class="form-label">Readonly</label>
|
|
35
|
+
<input type="text" class="form-control" name="example-password-input" value="Readolny value" readonly />
|
|
20
36
|
</div>
|
|
21
37
|
```
|
|
22
38
|
|
|
@@ -48,7 +64,7 @@ Use the `form-control-rounded` class if you prefer form controls with rounded co
|
|
|
48
64
|
<div class="input-icon">
|
|
49
65
|
<input type="text" value="" class="form-control form-control-rounded" placeholder="Search…" />
|
|
50
66
|
<span class="input-icon-addon">
|
|
51
|
-
<!-- SVG icon from http://tabler
|
|
67
|
+
<!-- SVG icon from http://tabler.io/icons/icon/search -->
|
|
52
68
|
<svg>...</svg>
|
|
53
69
|
</span>
|
|
54
70
|
</div>
|
|
@@ -59,7 +75,7 @@ Use the `form-control-rounded` class if you prefer form controls with rounded co
|
|
|
59
75
|
|
|
60
76
|
You can remove borders from your form control by adding the `form-control-flush` class.
|
|
61
77
|
|
|
62
|
-
```html
|
|
78
|
+
```html example centered columns={1} height="20rem"
|
|
63
79
|
<div class="mb-3">
|
|
64
80
|
<label class="form-label">Form control flush</label>
|
|
65
81
|
<input type="text" class="form-control form-control-flush" name="Form control flush" placeholder="Text.." />
|
|
@@ -70,7 +86,7 @@ You can remove borders from your form control by adding the `form-control-flush`
|
|
|
70
86
|
|
|
71
87
|
Add icons to your input controls to suggest users what they should enter or inform them of the current state of a form element.
|
|
72
88
|
|
|
73
|
-
```html example
|
|
89
|
+
```html example centered columns={1} height="20rem"
|
|
74
90
|
<div class="mb-3">
|
|
75
91
|
<label class="form-label">Icon input</label>
|
|
76
92
|
<div class="input-icon mb-3">
|
|
@@ -115,7 +131,7 @@ Add icons to your input controls to suggest users what they should enter or info
|
|
|
115
131
|
|
|
116
132
|
Include an additional element in your input section, such as a button which can be used to submit the information enetered in the input control.
|
|
117
133
|
|
|
118
|
-
```html example
|
|
134
|
+
```html example centered columns={1} height="20rem"
|
|
119
135
|
<div class="mb-3">
|
|
120
136
|
<label class="form-label">Separated inputs</label>
|
|
121
137
|
<div class="row g-2">
|
|
@@ -124,7 +140,6 @@ Include an additional element in your input section, such as a button which can
|
|
|
124
140
|
</div>
|
|
125
141
|
<div class="col-auto">
|
|
126
142
|
<a href="#" class="btn btn-icon" aria-label="Button">
|
|
127
|
-
|
|
128
143
|
<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">
|
|
129
144
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
130
145
|
<circle cx="10" cy="10" r="7" />
|
|
@@ -142,7 +157,7 @@ Use a multi-line text input control to enable users to enter longer pieces of te
|
|
|
142
157
|
|
|
143
158
|
Add one of the available selects - either a dropdown or a multiple choice select - to let users choose from a predefined set of options.
|
|
144
159
|
|
|
145
|
-
```html
|
|
160
|
+
```html example centered columns={1} height="30rem"
|
|
146
161
|
<div class="mb-3">
|
|
147
162
|
<label class="form-label">Textarea</label>
|
|
148
163
|
<textarea class="form-control" name="example-textarea" placeholder="Textarea placeholder"></textarea>
|
|
@@ -169,7 +184,7 @@ Add one of the available selects - either a dropdown or a multiple choice select
|
|
|
169
184
|
|
|
170
185
|
Choose the size of an input control that will go well with your form design. Apart from the default size, you can also use small and large input controls.
|
|
171
186
|
|
|
172
|
-
```html
|
|
187
|
+
```html example centered columns={1} height="20rem"
|
|
173
188
|
<div class="mb-3">
|
|
174
189
|
<label class="form-label">Input sizing</label>
|
|
175
190
|
<input class="form-control form-control-lg mb-2" type="text" placeholder=".form-control-lg" />
|
|
@@ -350,7 +365,7 @@ Add a range slider to make it possible for users to set a value or range, such a
|
|
|
350
365
|
|
|
351
366
|
Create a group of input controls and place add-ons on either side of an input.
|
|
352
367
|
|
|
353
|
-
```html
|
|
368
|
+
```html example centered columns={1} height="20rem"
|
|
354
369
|
<div class="mb-3">
|
|
355
370
|
<label class="form-label">Input group</label>
|
|
356
371
|
<div class="input-group mb-2">
|
|
@@ -381,7 +396,7 @@ Create a group of input controls and place add-ons on either side of an input.
|
|
|
381
396
|
|
|
382
397
|
Add checkboxes or radio buttons on either side of your input control.
|
|
383
398
|
|
|
384
|
-
```html
|
|
399
|
+
```html example centered columns={1} height="20rem"
|
|
385
400
|
<div class="mb-3">
|
|
386
401
|
<label class="form-label">Input with checkbox or radios</label>
|
|
387
402
|
<div class="input-group mb-2">
|
|
@@ -403,7 +418,7 @@ Add checkboxes or radio buttons on either side of your input control.
|
|
|
403
418
|
|
|
404
419
|
Add text to your input control, either before or after the text which is to be entered by a user.
|
|
405
420
|
|
|
406
|
-
```html
|
|
421
|
+
```html example centered columns={1} height="20rem"
|
|
407
422
|
<div class="mb-3">
|
|
408
423
|
<label class="form-label">Input with prepended text</label>
|
|
409
424
|
<div class="input-group input-group-flat mb-2">
|
|
@@ -425,7 +440,7 @@ Add text to your input control, either before or after the text which is to be e
|
|
|
425
440
|
|
|
426
441
|
Include a link in your input control to add a clickable element within the control.
|
|
427
442
|
|
|
428
|
-
```html
|
|
443
|
+
```html example centered columns={1} height="20rem"
|
|
429
444
|
<div class="mb-3">
|
|
430
445
|
<label class="form-label">Input with appended link</label>
|
|
431
446
|
<div class="input-group input-group-flat">
|
|
@@ -441,7 +456,7 @@ Include a link in your input control to add a clickable element within the contr
|
|
|
441
456
|
|
|
442
457
|
Include a `<kbd>` in your input control to add shortcut to the control.
|
|
443
458
|
|
|
444
|
-
```html
|
|
459
|
+
```html example centered columns={1}
|
|
445
460
|
<div class="mb-3">
|
|
446
461
|
<label class="form-label">Input with appended link</label>
|
|
447
462
|
<div class="input-group input-group-flat">
|
|
@@ -457,7 +472,7 @@ Include a `<kbd>` in your input control to add shortcut to the control.
|
|
|
457
472
|
|
|
458
473
|
Add an icon link which you want to display at the end of your input control to visually represent actions which a user can take.
|
|
459
474
|
|
|
460
|
-
```html example
|
|
475
|
+
```html example centered columns={1} height="20rem"
|
|
461
476
|
<div class="mb-3">
|
|
462
477
|
<label class="form-label">Input with appended icon links</label>
|
|
463
478
|
<div class="input-group input-group-flat">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Form fieldset
|
|
3
|
-
|
|
3
|
+
summary: By grouping form elements together with the fieldset element, you can improve the organization and accessibility of your forms, making it easier for users to understand the purpose of each input and provide accurate information.
|
|
4
|
+
description: Group form elements for clarity.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
## Default markup
|
|
@@ -37,7 +38,7 @@ Group parts of your form to make it well-structured and clearer for users, using
|
|
|
37
38
|
...
|
|
38
39
|
<div class="mb-3">
|
|
39
40
|
<label class="form-label required">Company</label>
|
|
40
|
-
<input type="text" class="form-control" autocomplete="off"/>
|
|
41
|
+
<input type="text" class="form-control" autocomplete="off" />
|
|
41
42
|
</div>
|
|
42
43
|
...
|
|
43
44
|
</fieldset>
|
|
@@ -1,12 +1,79 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Form helpers
|
|
3
|
-
|
|
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.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
## Input help
|
|
7
8
|
|
|
8
|
-
Use an input helper to display additional information about a form element. The text label will appear once a user hovers over the helper.
|
|
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.
|
|
9
10
|
|
|
10
|
-
```html
|
|
11
|
-
<span class="form-help" data-bs-toggle="popover" data-bs-placement="top" data-bs-html="true" data-bs-content="<p
|
|
11
|
+
```html
|
|
12
|
+
<span class="form-help" data-bs-toggle="popover" data-bs-placement="top" data-bs-html="true" data-bs-content="<p>...</p>">?</span>
|
|
12
13
|
```
|
|
14
|
+
|
|
15
|
+
Look at the example below to see how the input help works:
|
|
16
|
+
|
|
17
|
+
```html example centered height="25rem" columns={1}
|
|
18
|
+
<div>
|
|
19
|
+
<label class="form-label">
|
|
20
|
+
ZIP Code
|
|
21
|
+
<span class="form-help" data-bs-toggle="popover" data-bs-placement="top" data-bs-html="true" 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>">?</span>
|
|
22
|
+
</label>
|
|
23
|
+
<input type="text" class="form-control" placeholder="Your ZIP Code">
|
|
24
|
+
</div>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Required field
|
|
28
|
+
|
|
29
|
+
Use the `.required` class to indicate that a field is required. It will add a red asterisk to the label.
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<label class="form-label required">Required</label>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Look at the example below to see how the required field works:
|
|
36
|
+
|
|
37
|
+
```html example centered columns={1}
|
|
38
|
+
<div>
|
|
39
|
+
<label class="form-label required">Required</label>
|
|
40
|
+
<input type="text" class="form-control" name="..." placeholder="Required...">
|
|
41
|
+
</div>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Form hint
|
|
45
|
+
|
|
46
|
+
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.
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<div class="form-hint">We'll never share your email with anyone else.</div>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Look at the example below to see how the form hint works:
|
|
53
|
+
|
|
54
|
+
```html example centered columns={1}
|
|
55
|
+
<div>
|
|
56
|
+
<label class="form-label">Email address</label>
|
|
57
|
+
<input type="email" class="form-control" placeholder="Enter your email address">
|
|
58
|
+
<div class="form-hint">We'll never share your email with anyone else.</div>
|
|
59
|
+
</div>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Additional info inside label
|
|
63
|
+
|
|
64
|
+
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.
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<label class="form-label">Textarea <span class="form-label-description">56/100</span>
|
|
68
|
+
</label>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This example shows how to use the additional info inside the label:
|
|
72
|
+
|
|
73
|
+
```html example centered columns={1} height="15rem"
|
|
74
|
+
<div>
|
|
75
|
+
<label class="form-label">Textarea <span class="form-label-description">56/100</span>
|
|
76
|
+
</label>
|
|
77
|
+
<textarea class="form-control" name="" rows="3" placeholder="Content.."></textarea>
|
|
78
|
+
</div>
|
|
79
|
+
```
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
---
|
|
2
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.
|
|
3
5
|
---
|
|
4
6
|
|
|
5
|
-
|
|
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 style the image 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:
|
|
6
21
|
|
|
7
22
|
```html example centered columns="2" height="15rem"
|
|
8
23
|
<div class="mb-3">
|
|
@@ -10,7 +25,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
10
25
|
<div class="row g-2">
|
|
11
26
|
<div class="col-3">
|
|
12
27
|
<label class="form-imagecheck">
|
|
13
|
-
<input name="
|
|
28
|
+
<input name="image" type="checkbox" value="1" class="form-imagecheck-input" />
|
|
14
29
|
<span class="form-imagecheck-figure">
|
|
15
30
|
<img src="/samples/photos/everything-you-need-to-work-from-your-bed-2.jpg" alt="" class="form-imagecheck-image" />
|
|
16
31
|
</span>
|
|
@@ -18,7 +33,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
18
33
|
</div>
|
|
19
34
|
<div class="col-3">
|
|
20
35
|
<label class="form-imagecheck">
|
|
21
|
-
<input name="
|
|
36
|
+
<input name="image" type="checkbox" value="2" class="form-imagecheck-input" checked />
|
|
22
37
|
<span class="form-imagecheck-figure">
|
|
23
38
|
<img src="/samples/photos/color-palette-guide-sample-colors-catalog-.jpg" alt="" class="form-imagecheck-image" />
|
|
24
39
|
</span>
|
|
@@ -26,7 +41,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
26
41
|
</div>
|
|
27
42
|
<div class="col-3">
|
|
28
43
|
<label class="form-imagecheck">
|
|
29
|
-
<input name="
|
|
44
|
+
<input name="image" type="checkbox" value="3" class="form-imagecheck-input" />
|
|
30
45
|
<span class="form-imagecheck-figure">
|
|
31
46
|
<img src="/samples/photos/woman-read-book-and-drink-coffee-2.jpg" alt="" class="form-imagecheck-image" />
|
|
32
47
|
</span>
|
|
@@ -34,7 +49,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
34
49
|
</div>
|
|
35
50
|
<div class="col-3">
|
|
36
51
|
<label class="form-imagecheck">
|
|
37
|
-
<input name="
|
|
52
|
+
<input name="image" type="checkbox" value="4" class="form-imagecheck-input" checked />
|
|
38
53
|
<span class="form-imagecheck-figure">
|
|
39
54
|
<img src="/samples/photos/stylish-workspace-with-macbook-pro-2.jpg" alt="" class="form-imagecheck-image" />
|
|
40
55
|
</span>
|
|
@@ -44,14 +59,9 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
44
59
|
</div>
|
|
45
60
|
```
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<span class="form-imagecheck-figure">
|
|
51
|
-
<img src="..." alt="" class="form-imagecheck-image" />
|
|
52
|
-
</span>
|
|
53
|
-
</label>
|
|
54
|
-
```
|
|
62
|
+
## Radio buttons
|
|
63
|
+
|
|
64
|
+
If you want to use the image check as a radio button, you can change the input type to `radio`.
|
|
55
65
|
|
|
56
66
|
```html example centered columns="2" height="15rem"
|
|
57
67
|
<div class="mb-3">
|
|
@@ -59,7 +69,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
59
69
|
<div class="row g-2">
|
|
60
70
|
<div class="col-3">
|
|
61
71
|
<label class="form-imagecheck mb-2">
|
|
62
|
-
<input name="
|
|
72
|
+
<input name="image" type="radio" value="1" class="form-imagecheck-input" />
|
|
63
73
|
<span class="form-imagecheck-figure">
|
|
64
74
|
<img src="/samples/photos/woman-drinking-hot-tea-in-her-home-office.jpg" alt="" class="form-imagecheck-image" />
|
|
65
75
|
</span>
|
|
@@ -67,7 +77,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
67
77
|
</div>
|
|
68
78
|
<div class="col-3">
|
|
69
79
|
<label class="form-imagecheck mb-2">
|
|
70
|
-
<input name="
|
|
80
|
+
<input name="image" type="radio" value="2" class="form-imagecheck-input" checked />
|
|
71
81
|
<span class="form-imagecheck-figure">
|
|
72
82
|
<img src="/samples/photos/young-woman-sitting-on-the-sofa-and-working-on-her-laptop-3.jpg" alt="" class="form-imagecheck-image" />
|
|
73
83
|
</span>
|
|
@@ -75,7 +85,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
75
85
|
</div>
|
|
76
86
|
<div class="col-3">
|
|
77
87
|
<label class="form-imagecheck mb-2">
|
|
78
|
-
<input name="
|
|
88
|
+
<input name="image" type="radio" value="3" class="form-imagecheck-input" />
|
|
79
89
|
<span class="form-imagecheck-figure">
|
|
80
90
|
<img src="/samples/photos/beautiful-blonde-woman-relaxing-with-a-can-of-coke-on-a-tree-stump-by-the-beach.jpg" alt="" class="form-imagecheck-image" />
|
|
81
91
|
</span>
|
|
@@ -83,7 +93,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
83
93
|
</div>
|
|
84
94
|
<div class="col-3">
|
|
85
95
|
<label class="form-imagecheck mb-2">
|
|
86
|
-
<input name="
|
|
96
|
+
<input name="image" type="radio" value="4" class="form-imagecheck-input" checked />
|
|
87
97
|
<span class="form-imagecheck-figure">
|
|
88
98
|
<img src="/samples/photos/book-on-the-grass.jpg" alt="" class="form-imagecheck-image" />
|
|
89
99
|
</span>
|
|
@@ -95,53 +105,57 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
95
105
|
|
|
96
106
|
```html
|
|
97
107
|
<label class="form-imagecheck">
|
|
98
|
-
<input name="
|
|
108
|
+
<input name="..." type="radio" value="1" class="form-imagecheck-input" />
|
|
99
109
|
<span class="form-imagecheck-figure">
|
|
100
|
-
<img src="
|
|
110
|
+
<img src="..." alt="" class="form-imagecheck-image" />
|
|
101
111
|
</span>
|
|
102
112
|
</label>
|
|
103
113
|
```
|
|
104
114
|
|
|
105
|
-
|
|
115
|
+
## Avatars
|
|
116
|
+
|
|
117
|
+
If you want to use the image check with avatars, you can use the `.avatar` instead of the image.
|
|
118
|
+
|
|
119
|
+
```html example centered columns={2} height="15rem"
|
|
106
120
|
<div class="mb-3">
|
|
107
121
|
<label class="form-label">Person Check</label>
|
|
108
122
|
<div class="row g-2">
|
|
109
123
|
<div class="col-auto">
|
|
110
124
|
<label class="form-imagecheck mb-2">
|
|
111
|
-
<input name="
|
|
125
|
+
<input name="image" type="checkbox" value="1" class="form-imagecheck-input" />
|
|
112
126
|
<span class="form-imagecheck-figure">
|
|
113
127
|
<span class="form-imagecheck-image">
|
|
114
|
-
<span class="avatar avatar-
|
|
128
|
+
<span class="avatar avatar-xl" style="background-image: url(/samples/avatars/057f.jpg)"></span>
|
|
115
129
|
</span>
|
|
116
130
|
</span>
|
|
117
131
|
</label>
|
|
118
132
|
</div>
|
|
119
133
|
<div class="col-auto">
|
|
120
134
|
<label class="form-imagecheck mb-2">
|
|
121
|
-
<input name="
|
|
135
|
+
<input name="image" type="checkbox" value="2" class="form-imagecheck-input" checked />
|
|
122
136
|
<span class="form-imagecheck-figure">
|
|
123
137
|
<span class="form-imagecheck-image">
|
|
124
|
-
<span class="avatar avatar-
|
|
138
|
+
<span class="avatar avatar-xl">HS</span>
|
|
125
139
|
</span>
|
|
126
140
|
</span>
|
|
127
141
|
</label>
|
|
128
142
|
</div>
|
|
129
143
|
<div class="col-auto">
|
|
130
144
|
<label class="form-imagecheck mb-2">
|
|
131
|
-
<input name="
|
|
145
|
+
<input name="image" type="checkbox" value="3" class="form-imagecheck-input" />
|
|
132
146
|
<span class="form-imagecheck-figure">
|
|
133
147
|
<span class="form-imagecheck-image">
|
|
134
|
-
<span class="avatar avatar-
|
|
148
|
+
<span class="avatar avatar-xl" style="background-image: url(/samples/avatars/062m.jpg)"></span>
|
|
135
149
|
</span>
|
|
136
150
|
</span>
|
|
137
151
|
</label>
|
|
138
152
|
</div>
|
|
139
153
|
<div class="col-auto">
|
|
140
154
|
<label class="form-imagecheck mb-2">
|
|
141
|
-
<input name="
|
|
155
|
+
<input name="image" type="checkbox" value="4" class="form-imagecheck-input" checked />
|
|
142
156
|
<span class="form-imagecheck-figure">
|
|
143
157
|
<span class="form-imagecheck-image">
|
|
144
|
-
<span class="avatar avatar-
|
|
158
|
+
<span class="avatar avatar-xl" style="background-image: url(/samples/avatars/070m.jpg)"></span>
|
|
145
159
|
</span>
|
|
146
160
|
</span>
|
|
147
161
|
</label>
|
|
@@ -152,7 +166,7 @@ Add an image check to your form and give users visually attractive options to ch
|
|
|
152
166
|
|
|
153
167
|
```html
|
|
154
168
|
<label class="form-imagecheck">
|
|
155
|
-
<input name="" type="checkbox" value="" class="form-imagecheck-input" />
|
|
169
|
+
<input name="..." type="checkbox" value="..." class="form-imagecheck-input" />
|
|
156
170
|
<span class="form-imagecheck-figure">
|
|
157
171
|
<span class="form-imagecheck-image">
|
|
158
172
|
<span class="avatar avatar-md" style="background-image: url(...)"></span>
|
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Input mask
|
|
3
|
-
|
|
3
|
+
summary: An input mask is a 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.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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).
|
|
9
26
|
|
|
10
27
|
## Default markup
|
|
11
28
|
|
|
12
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.
|
|
13
30
|
|
|
14
|
-
|
|
31
|
+
To create an input mask, add the `data-mask` attribute to the input element:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<input type="text" name="input-mask" class="form-control" data-mask="(00) 0000-0000" placeholder="(00) 0000-0000" autocomplete="off" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Look at the example below to see how the input mask works:
|
|
38
|
+
|
|
39
|
+
```html example centered columns={1}
|
|
15
40
|
<label class="form-label">Telephone mask</label>
|
|
16
41
|
<input type="text" name="input-mask" class="form-control" data-mask="(00) 0000-0000" data-mask-visible="true" placeholder="(00) 0000-0000" autocomplete="off" />
|
|
17
42
|
```
|
|
18
43
|
|
|
44
|
+
## More examples
|
|
45
|
+
|
|
46
|
+
If you need more examples of input masks, you can find them in the [IMask documentation](https://imask.js.org/guide.html#masked-input).
|