@tabler/core 1.0.0-beta23 → 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 +2 -2
- package/dist/css/tabler-socials.min.css +2 -2
- package/dist/css/tabler-socials.rtl.css +2 -2
- package/dist/css/tabler-socials.rtl.min.css +2 -2
- package/dist/css/tabler-vendors.css +23 -18
- package/dist/css/tabler-vendors.min.css +3 -3
- package/dist/css/tabler-vendors.rtl.css +23 -18
- package/dist/css/tabler-vendors.rtl.min.css +3 -3
- package/dist/css/tabler.css +1296 -1505
- package/dist/css/tabler.min.css +4 -4
- package/dist/css/tabler.rtl.css +1296 -1505
- package/dist/css/tabler.rtl.min.css +4 -4
- 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 +2 -2
- package/dist/js/tabler.esm.min.js +2 -2
- package/dist/js/tabler.js +2 -2
- package/dist/js/tabler.min.js +2 -2
- package/docs/illustrations/introduction/contents.mdx +77 -0
- package/docs/illustrations/introduction/customization.mdx +0 -11
- package/docs/illustrations/introduction/license.mdx +22 -0
- package/docs/ui/components/alerts.mdx +38 -114
- package/docs/ui/components/badges.mdx +57 -75
- package/docs/ui/components/charts.mdx +13 -23
- package/docs/ui/components/countup.mdx +73 -43
- package/docs/ui/components/dropzone.mdx +37 -6
- package/docs/ui/components/icons.mdx +49 -11
- package/docs/ui/components/inline-player.mdx +28 -2
- package/docs/ui/components/modals.mdx +40 -10
- package/docs/ui/components/offcanvas.mdx +55 -0
- package/docs/ui/components/placeholder.mdx +16 -17
- package/docs/ui/components/range-slider.mdx +0 -1
- package/docs/ui/components/statuses.mdx +12 -0
- package/docs/ui/components/steps.mdx +59 -17
- package/docs/ui/components/tinymce.mdx +0 -1
- package/docs/ui/components/vector-maps.mdx +170 -0
- package/docs/ui/forms/form-elements.mdx +0 -1
- package/docs/ui/getting-started/browser-support.mdx +8 -2
- package/docs/ui/getting-started/how-to-contribute.mdx +96 -0
- package/docs/ui/getting-started/installation.mdx +67 -0
- package/docs/ui/getting-started/license.mdx +30 -0
- package/docs/ui/layout/navbars.mdx +106 -0
- package/docs/ui/layout/navs-tabls.mdx +187 -0
- package/docs/ui/layout/page-layouts.mdx +8 -5
- package/docs/ui/utilities/borders.mdx +67 -48
- package/docs/ui/utilities/cursors.mdx +20 -50
- package/docs/ui/utilities/interactions.mdx +2 -2
- 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 +7 -5
- 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 +55 -18
- 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-vendors.scss +1 -0
- package/src/scss/ui/_buttons.scss +7 -7
- package/src/scss/ui/_images.scss +4 -0
- package/src/scss/ui/_lists.scss +11 -15
- package/src/scss/utils/_colors.scss +1 -1
- package/src/scss/vendor/_dropzone.scss +3 -3
- package/src/scss/vendor/_typed.scss +4 -0
- package/docs/ui/getting-started/development.mdx +0 -32
|
@@ -9,41 +9,43 @@ bootstrapLink: components/badge/
|
|
|
9
9
|
|
|
10
10
|
The default badges are square and come in the basic set of colors.
|
|
11
11
|
|
|
12
|
-
```html example
|
|
13
|
-
<span class="badge bg-blue">Blue</span>
|
|
14
|
-
<span class="badge bg-azure">Azure</span>
|
|
15
|
-
<span class="badge bg-indigo">Indigo</span>
|
|
16
|
-
<span class="badge bg-purple">Purple</span>
|
|
17
|
-
<span class="badge bg-pink">Pink</span>
|
|
18
|
-
<span class="badge bg-red">Red</span>
|
|
19
|
-
<span class="badge bg-orange">Orange</span>
|
|
20
|
-
<span class="badge bg-yellow">Yellow</span>
|
|
21
|
-
<span class="badge bg-lime">Lime</span>
|
|
22
|
-
<span class="badge bg-green">Green</span>
|
|
23
|
-
<span class="badge bg-teal">Teal</span>
|
|
24
|
-
<span class="badge bg-cyan">Cyan</span>
|
|
12
|
+
```html example centered separated
|
|
13
|
+
<span class="badge bg-blue-lt">Blue</span>
|
|
14
|
+
<span class="badge bg-azure-lt">Azure</span>
|
|
15
|
+
<span class="badge bg-indigo-lt">Indigo</span>
|
|
16
|
+
<span class="badge bg-purple-lt">Purple</span>
|
|
17
|
+
<span class="badge bg-pink-lt">Pink</span>
|
|
18
|
+
<span class="badge bg-red-lt">Red</span>
|
|
19
|
+
<span class="badge bg-orange-lt">Orange</span>
|
|
20
|
+
<span class="badge bg-yellow-lt">Yellow</span>
|
|
21
|
+
<span class="badge bg-lime-lt">Lime</span>
|
|
22
|
+
<span class="badge bg-green-lt">Green</span>
|
|
23
|
+
<span class="badge bg-teal-lt">Teal</span>
|
|
24
|
+
<span class="badge bg-cyan-lt">Cyan</span>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Headings
|
|
28
28
|
|
|
29
|
-
```html example height="
|
|
30
|
-
<h1>Example heading <span class="badge
|
|
29
|
+
```html example columns={1} height="20rem" centered
|
|
30
|
+
<h1>Example heading <span class="badge">New</span>
|
|
31
31
|
</h1>
|
|
32
|
-
<h2>Example heading <span class="badge
|
|
32
|
+
<h2>Example heading <span class="badge">New</span>
|
|
33
33
|
</h2>
|
|
34
|
-
<h3>Example heading <span class="badge
|
|
34
|
+
<h3>Example heading <span class="badge">New</span>
|
|
35
35
|
</h3>
|
|
36
|
-
<h4>Example heading <span class="badge
|
|
36
|
+
<h4>Example heading <span class="badge">New</span>
|
|
37
37
|
</h4>
|
|
38
|
-
<h5>Example heading <span class="badge
|
|
38
|
+
<h5>Example heading <span class="badge">New</span>
|
|
39
39
|
</h5>
|
|
40
|
-
<h6>Example heading <span class="badge
|
|
40
|
+
<h6>Example heading <span class="badge">New</span>
|
|
41
41
|
</h6>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## Outline badges
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
```html example centered separated
|
|
47
49
|
<span class="badge badge-outline text-blue">blue</span>
|
|
48
50
|
<span class="badge badge-outline text-azure">azure</span>
|
|
49
51
|
<span class="badge badge-outline text-indigo">indigo</span>
|
|
@@ -62,75 +64,55 @@ The default badges are square and come in the basic set of colors.
|
|
|
62
64
|
|
|
63
65
|
Use the `.badge-pill` class if you want to create a badge with rounded corners. Its width will adjust to the label text.
|
|
64
66
|
|
|
65
|
-
```html example centered separated
|
|
66
|
-
<span class="badge badge-pill bg-blue">1</span>
|
|
67
|
-
<span class="badge badge-pill bg-azure">2</span>
|
|
68
|
-
<span class="badge badge-pill bg-indigo">3</span>
|
|
69
|
-
<span class="badge badge-pill bg-purple">4</span>
|
|
70
|
-
<span class="badge badge-pill bg-pink">5</span>
|
|
71
|
-
<span class="badge badge-pill bg-red">6</span>
|
|
72
|
-
<span class="badge badge-pill bg-orange">7</span>
|
|
73
|
-
<span class="badge badge-pill bg-yellow">8</span>
|
|
74
|
-
<span class="badge badge-pill bg-lime">9</span>
|
|
75
|
-
<span class="badge badge-pill bg-green">10</span>
|
|
76
|
-
<span class="badge badge-pill bg-teal">11</span>
|
|
77
|
-
<span class="badge badge-pill bg-cyan">12</span>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Soft color badges
|
|
81
|
-
|
|
82
|
-
You can create a soft colour variant of a corresponding contextual badge variation, to make it look more subtle. Click [here](/docs/ui/base/colors) to see the list of available colors and choose ones that best suit your design.
|
|
83
|
-
|
|
84
|
-
```html example vertical centered separated scrollable height="15rem"
|
|
85
|
-
<span class="badge bg-blue-lt">Blue</span>
|
|
86
|
-
<span class="badge bg-azure-lt">Azure</span>
|
|
87
|
-
<span class="badge bg-indigo-lt">Indigo</span>
|
|
88
|
-
<span class="badge bg-purple-lt">Purple</span>
|
|
89
|
-
<span class="badge bg-pink-lt">Pink</span>
|
|
90
|
-
<span class="badge bg-red-lt">Red</span>
|
|
91
|
-
<span class="badge bg-orange-lt">Orange</span>
|
|
92
|
-
<span class="badge bg-yellow-lt">Yellow</span>
|
|
93
|
-
<span class="badge bg-lime-lt">Lime</span>
|
|
94
|
-
<span class="badge bg-green-lt">Green</span>
|
|
95
|
-
<span class="badge bg-teal-lt">Teal</span>
|
|
96
|
-
<span class="badge bg-cyan-lt">Cyan</span>
|
|
67
|
+
```html example centered separated
|
|
68
|
+
<span class="badge badge-pill bg-blue-lt">1</span>
|
|
69
|
+
<span class="badge badge-pill bg-azure-lt">2</span>
|
|
70
|
+
<span class="badge badge-pill bg-indigo-lt">3</span>
|
|
71
|
+
<span class="badge badge-pill bg-purple-lt">4</span>
|
|
72
|
+
<span class="badge badge-pill bg-pink-lt">5</span>
|
|
73
|
+
<span class="badge badge-pill bg-red-lt">6</span>
|
|
74
|
+
<span class="badge badge-pill bg-orange-lt">7</span>
|
|
75
|
+
<span class="badge badge-pill bg-yellow-lt">8</span>
|
|
76
|
+
<span class="badge badge-pill bg-lime-lt">9</span>
|
|
77
|
+
<span class="badge badge-pill bg-green-lt">10</span>
|
|
78
|
+
<span class="badge badge-pill bg-teal-lt">11</span>
|
|
79
|
+
<span class="badge badge-pill bg-cyan-lt">12</span>
|
|
97
80
|
```
|
|
98
81
|
|
|
99
82
|
## Links
|
|
100
83
|
|
|
101
84
|
Place the badge within an `<a>` element if you want it to perform the function of a link and make it clickable.
|
|
102
85
|
|
|
103
|
-
```html example
|
|
104
|
-
<a href="#" class="badge bg-blue">Blue</a>
|
|
105
|
-
<a href="#" class="badge bg-azure">Azure</a>
|
|
106
|
-
<a href="#" class="badge bg-indigo">Indigo</a>
|
|
107
|
-
<a href="#" class="badge bg-purple">Purple</a>
|
|
108
|
-
<a href="#" class="badge bg-pink">Pink</a>
|
|
109
|
-
<a href="#" class="badge bg-red">Red</a>
|
|
110
|
-
<a href="#" class="badge bg-orange">Orange</a>
|
|
111
|
-
<a href="#" class="badge bg-yellow">Yellow</a>
|
|
112
|
-
<a href="#" class="badge bg-lime">Lime</a>
|
|
113
|
-
<a href="#" class="badge bg-green">Green</a>
|
|
114
|
-
<a href="#" class="badge bg-teal">Teal</a>
|
|
115
|
-
<a href="#" class="badge bg-cyan">Cyan</a>
|
|
86
|
+
```html example centered separated
|
|
87
|
+
<a href="#" class="badge bg-blue-lt">Blue</a>
|
|
88
|
+
<a href="#" class="badge bg-azure-lt">Azure</a>
|
|
89
|
+
<a href="#" class="badge bg-indigo-lt">Indigo</a>
|
|
90
|
+
<a href="#" class="badge bg-purple-lt">Purple</a>
|
|
91
|
+
<a href="#" class="badge bg-pink-lt">Pink</a>
|
|
92
|
+
<a href="#" class="badge bg-red-lt">Red</a>
|
|
93
|
+
<a href="#" class="badge bg-orange-lt">Orange</a>
|
|
94
|
+
<a href="#" class="badge bg-yellow-lt">Yellow</a>
|
|
95
|
+
<a href="#" class="badge bg-lime-lt">Lime</a>
|
|
96
|
+
<a href="#" class="badge bg-green-lt">Green</a>
|
|
97
|
+
<a href="#" class="badge bg-teal-lt">Teal</a>
|
|
98
|
+
<a href="#" class="badge bg-cyan-lt">Cyan</a>
|
|
116
99
|
```
|
|
117
100
|
|
|
118
101
|
## Button with badge
|
|
119
102
|
|
|
120
103
|
Badges can be used as part of links or buttons to provide a counter.
|
|
121
104
|
|
|
122
|
-
```
|
|
123
|
-
<button type="button" class="btn">
|
|
124
|
-
</
|
|
125
|
-
<button type="button" class="btn">Notifications <span class="badge bg-green ms-2">4</span>
|
|
105
|
+
```
|
|
106
|
+
<button type="button" class="btn">
|
|
107
|
+
Notifications <span class="badge bg-red-lt ms-2">4</span>
|
|
126
108
|
</button>
|
|
127
109
|
```
|
|
128
110
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
The results can be seen in the example below.
|
|
112
|
+
|
|
113
|
+
```html example centered separated background="surface"
|
|
114
|
+
<button type="button" class="btn">Notifications <span class="badge bg-red-lt ms-2">4</span>
|
|
132
115
|
</button>
|
|
133
|
-
<button type="button" class="btn">
|
|
134
|
-
Notifications <span class="badge bg-green ms-2">4</span>
|
|
116
|
+
<button type="button" class="btn">Notifications <span class="badge bg-green-lt ms-2">4</span>
|
|
135
117
|
</button>
|
|
136
118
|
```
|
|
@@ -11,16 +11,14 @@ See also the [ApexCharts](https://apexcharts.com/) documentation.
|
|
|
11
11
|
|
|
12
12
|
## Line Chart
|
|
13
13
|
|
|
14
|
-
Line charts are
|
|
14
|
+
Line charts are an essential tool for visualizing data trends over time. They are particularly useful for representing continuous data, such as stock prices, website traffic, or user activity. Below is an example of a line chart showcasing session duration, page views, and total visits:
|
|
15
15
|
|
|
16
|
-
```html example centered columns={2} height="25rem"
|
|
16
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
17
17
|
<div class="card">
|
|
18
18
|
<div class="card-body">
|
|
19
19
|
<div id="chart-demo-line" class="chart-lg"></div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
|
-
|
|
23
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
24
22
|
<script>
|
|
25
23
|
document.addEventListener("DOMContentLoaded", function() {
|
|
26
24
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-demo-line'), {
|
|
@@ -105,16 +103,14 @@ Line charts are a typical pictorial representation that depicts trends and behav
|
|
|
105
103
|
|
|
106
104
|
## Area Chart
|
|
107
105
|
|
|
108
|
-
Area charts are
|
|
106
|
+
Area charts are ideal for representing cumulative data over time. They add visual emphasis to trends by filling the space under the line, making it easier to compare values. Here's an example of an area chart with smooth transitions and data from two series:
|
|
109
107
|
|
|
110
|
-
```html example centered columns={2} height="25rem"
|
|
108
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
111
109
|
<div class="card">
|
|
112
110
|
<div class="card-body">
|
|
113
111
|
<div id="chart-demo-area" class="chart-lg"></div>
|
|
114
112
|
</div>
|
|
115
113
|
</div>
|
|
116
|
-
|
|
117
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
118
114
|
<script>
|
|
119
115
|
document.addEventListener("DOMContentLoaded", function() {
|
|
120
116
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-demo-area'), {
|
|
@@ -203,16 +199,14 @@ Area charts are used to represent quantitative variations.
|
|
|
203
199
|
|
|
204
200
|
## Bar Chart
|
|
205
201
|
|
|
206
|
-
|
|
202
|
+
Bar charts are highly effective for comparing data across different categories. They provide a clear and concise way to visualize differences in values, making them perfect for analyzing categorical data. Here's an example of a bar chart with stacked bars for enhanced readability:
|
|
207
203
|
|
|
208
|
-
```html example centered columns={2} height="25rem"
|
|
204
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
209
205
|
<div class="card">
|
|
210
206
|
<div class="card-body">
|
|
211
207
|
<div id="chart-demo-bar" class="chart-lg"></div>
|
|
212
208
|
</div>
|
|
213
209
|
</div>
|
|
214
|
-
|
|
215
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
216
210
|
<script>
|
|
217
211
|
document.addEventListener("DOMContentLoaded", function() {
|
|
218
212
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-demo-bar'), {
|
|
@@ -311,16 +305,14 @@ A bar chart is the best tool for displaying comparisons between categories of da
|
|
|
311
305
|
|
|
312
306
|
## Pie Chart
|
|
313
307
|
|
|
314
|
-
Pie charts are
|
|
308
|
+
Pie charts are a simple and effective way to visualize proportions and ratios. They are commonly used to represent data as percentages of a whole, making them ideal for displaying parts of a dataset. Below is an example of a pie chart showcasing distribution across categories:
|
|
315
309
|
|
|
316
|
-
```html example centered columns={2} height="25rem"
|
|
310
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
317
311
|
<div class="card">
|
|
318
312
|
<div class="card-body">
|
|
319
313
|
<div id="chart-demo-pie" class="chart-lg"></div>
|
|
320
314
|
</div>
|
|
321
315
|
</div>
|
|
322
|
-
|
|
323
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
324
316
|
<script>
|
|
325
317
|
document.addEventListener("DOMContentLoaded", function() {
|
|
326
318
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-demo-pie'), {
|
|
@@ -371,16 +363,14 @@ Pie charts are an instrumental visualization tool useful in expressing data and
|
|
|
371
363
|
|
|
372
364
|
## Heatmap Chart
|
|
373
365
|
|
|
374
|
-
|
|
366
|
+
Heatmaps provide a graphical representation of data where individual values are represented by color intensity. They are particularly useful for identifying patterns or anomalies within large datasets. Here's an example of a heatmap chart to visualize data distributions:
|
|
375
367
|
|
|
376
|
-
```html example centered columns={2} height="25rem"
|
|
368
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
377
369
|
<div class="card">
|
|
378
370
|
<div class="card-body">
|
|
379
371
|
<div id="chart-demo-pie" class="chart-lg"></div>
|
|
380
372
|
</div>
|
|
381
373
|
</div>
|
|
382
|
-
|
|
383
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
384
374
|
<script>
|
|
385
375
|
document.addEventListener("DOMContentLoaded", function() {
|
|
386
376
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-demo-pie'), {
|
|
@@ -431,14 +421,14 @@ Heatmap is a visualization tool that employs color the way a bar chart employs h
|
|
|
431
421
|
|
|
432
422
|
## Advanced example
|
|
433
423
|
|
|
434
|
-
|
|
424
|
+
For more complex data visualizations, you can create advanced charts with multiple series and custom configurations. Below is an example of a social media referrals chart combining data from Facebook, Twitter, and Dribbble:
|
|
425
|
+
|
|
426
|
+
```html example centered columns={2} height="25rem" background="surface" libs="apexcharts"
|
|
435
427
|
<div class="card">
|
|
436
428
|
<div class="card-body">
|
|
437
429
|
<div id="chart-social-referrals" class="chart-lg"></div>
|
|
438
430
|
</div>
|
|
439
431
|
</div>
|
|
440
|
-
|
|
441
|
-
<script src="$TABLER_CDN/dist/libs/apexcharts/dist/apexcharts.min.js" defer></script>
|
|
442
432
|
<script>
|
|
443
433
|
document.addEventListener("DOMContentLoaded", function() {
|
|
444
434
|
window.ApexCharts && (new ApexCharts(document.getElementById('chart-social-referrals'), {
|
|
@@ -5,13 +5,23 @@ libs: countup
|
|
|
5
5
|
description: Display numbers dynamically with countups.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
The countup component is used to display numbers dynamically. It is a great way to make the interface more interactive and engaging. The countup component is a simple and easy way to animate numbers in your application.
|
|
9
|
+
|
|
8
10
|
To be able to use the countup in your application you will need to install the countup.js dependency with `npm install countup.js`.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
For more advanced features of countups, click [here](https://inorganik.github.io/countUp.js/) and see what more you can do.
|
|
13
|
+
|
|
14
|
+
## Basic usage
|
|
11
15
|
|
|
12
16
|
To create a countup, add `data-countup` to any HTML text tag and specify the number which is to be reached. The animation will be triggered as soon as the number enters the viewport.
|
|
13
17
|
|
|
14
|
-
```html
|
|
18
|
+
```html
|
|
19
|
+
<h1 data-countup>30000</h1>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The results can be seen in the example below.
|
|
23
|
+
|
|
24
|
+
```html example libs="countup" centered
|
|
15
25
|
<h1 data-countup>30000</h1>
|
|
16
26
|
```
|
|
17
27
|
|
|
@@ -19,9 +29,13 @@ To create a countup, add `data-countup` to any HTML text tag and specify the num
|
|
|
19
29
|
|
|
20
30
|
Set the `duration` to determine how long the animation should take. By default, the duration is set to 2 seconds, but you can modify it as you wish.
|
|
21
31
|
|
|
22
|
-
```html
|
|
23
|
-
<
|
|
32
|
+
```html
|
|
33
|
+
<h1 data-countup='{"duration":4}'>30000</h1>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Look at the example below to see how the duration affects the animation.
|
|
24
37
|
|
|
38
|
+
```html example libs="countup" centered vertical separated
|
|
25
39
|
<h1 data-countup>30000</h1>
|
|
26
40
|
<h1 data-countup='{"duration":4}'>30000</h1>
|
|
27
41
|
<h1 data-countup='{"duration":6}'>30000</h1>
|
|
@@ -32,20 +46,28 @@ Set the `duration` to determine how long the animation should take. By default,
|
|
|
32
46
|
By default the countup will start from zero. If you want to set a different start value use `startVal`.
|
|
33
47
|
You can also set the start value to be greater than the final value, so that it counts down instead of up.
|
|
34
48
|
|
|
35
|
-
```html
|
|
36
|
-
<
|
|
49
|
+
```html
|
|
50
|
+
<h1 data-countup='{"startVal":12345}'>30000</h1>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
To see how the starting value affects the animation, look at the example below.
|
|
37
54
|
|
|
55
|
+
```html example libs="countup" centered vertical separated
|
|
38
56
|
<h1 data-countup='{"startVal":12345}'>30000</h1>
|
|
39
57
|
<h1 data-countup='{"startVal":47655}'>30000</h1>
|
|
40
58
|
```
|
|
41
59
|
|
|
42
60
|
## Decimal places
|
|
43
61
|
|
|
44
|
-
Set how many decimal numbers should be displayed using `decimalPlaces`.
|
|
62
|
+
Set how many decimal numbers should be displayed using `decimalPlaces`. By default, the number of decimal places is set to 0.
|
|
45
63
|
|
|
46
|
-
```html
|
|
47
|
-
<
|
|
64
|
+
```html
|
|
65
|
+
<h1 data-countup='{"decimalPlaces":1}'>3.123</h1>
|
|
66
|
+
```
|
|
48
67
|
|
|
68
|
+
Look at the example below to see how the number of decimal places affects the animation.
|
|
69
|
+
|
|
70
|
+
```html example libs="countup" centered vertical separated height="20rem"
|
|
49
71
|
<h1 data-countup>3.123</h1>
|
|
50
72
|
<h1 data-countup='{"decimalPlaces":1}'>3.123</h1>
|
|
51
73
|
<h1 data-countup='{"decimalPlaces":2}'>3.123</h1>
|
|
@@ -54,82 +76,90 @@ Set how many decimal numbers should be displayed using `decimalPlaces`.
|
|
|
54
76
|
|
|
55
77
|
## Easing
|
|
56
78
|
|
|
57
|
-
Disable easing using `"useEasing": false`. Easing is set to `true` by default, so that the animation speed changes over the course of its duration.
|
|
79
|
+
Disable easing using `"useEasing": false`. Easing is set to `true` by default, so that the animation speed changes over the course of its duration. Easing can be disabled to make the animation linear.
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<h1 data-countup='{"useEasing": false}'>30000</h1>
|
|
83
|
+
```
|
|
58
84
|
|
|
59
|
-
|
|
60
|
-
<script src="$TABLER_CDN/dist/libs/countup.js/dist/countUp.js"></script>
|
|
85
|
+
Look at the example below to see how easing affects the animation.
|
|
61
86
|
|
|
87
|
+
```html example libs="countup" centered vertical separated
|
|
62
88
|
<h1 data-countup>30000</h1>
|
|
63
89
|
<h1 data-countup='{"useEasing": false}'>30000</h1>
|
|
64
90
|
```
|
|
65
91
|
|
|
66
92
|
## Use grouping
|
|
67
93
|
|
|
68
|
-
Disable grouping using `"useGrouping": false`. Grouping is set to `true` by default
|
|
94
|
+
Disable grouping using `"useGrouping": false`. Grouping is set to `true` by default, so that the number is displayed with a separator.
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<h1 data-countup='{"useGrouping": false}'>30000</h1>
|
|
98
|
+
```
|
|
69
99
|
|
|
70
|
-
|
|
71
|
-
<script src="$TABLER_CDN/dist/libs/countup.js/dist/countUp.js"></script>
|
|
100
|
+
Example below shows how grouping affects the animation.
|
|
72
101
|
|
|
102
|
+
```html example libs="countup" centered vertical separated
|
|
73
103
|
<h1 data-countup>30000</h1>
|
|
74
104
|
<h1 data-countup='{"useGrouping": false}'>30000</h1>
|
|
75
105
|
```
|
|
76
106
|
|
|
77
107
|
## Separator
|
|
78
108
|
|
|
79
|
-
You can change the default
|
|
109
|
+
You can change the default separator using `separator` and specifying the one you wish to use.
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<h1 data-countup='{"separator":" "}'>3000000</h1>
|
|
113
|
+
```
|
|
80
114
|
|
|
81
|
-
|
|
82
|
-
<script src="$TABLER_CDN/dist/libs/countup.js/dist/countUp.js"></script>
|
|
115
|
+
This example shows how the separator affects the animation.
|
|
83
116
|
|
|
117
|
+
```html example libs="countup" centered vertical separated
|
|
84
118
|
<h1 data-countup>3000000</h1>
|
|
85
119
|
<h1 data-countup='{"separator":" "}'>3000000</h1>
|
|
86
|
-
<h1 data-countup='{"separator":"-"}'>3000000</h1>
|
|
87
|
-
<h1 data-countup='{"separator":":"}'>3000000</h1>
|
|
88
120
|
```
|
|
89
121
|
|
|
90
122
|
## Decimal separator
|
|
91
123
|
|
|
92
|
-
You can
|
|
124
|
+
You can change the default decimal separator using `decimal` and specifying the one you wish to use.
|
|
93
125
|
|
|
94
|
-
```html
|
|
95
|
-
<
|
|
126
|
+
```html
|
|
127
|
+
<h1 data-countup='{"decimal":","}'>3.12</h1>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Look at the example below to see how the decimal separator affects the animation.
|
|
96
131
|
|
|
132
|
+
```html example libs="countup" centered vertical separated
|
|
97
133
|
<h1 data-countup='{"decimalPlaces":2}'>3.12</h1>
|
|
98
|
-
<h1 data-countup='{"decimalPlaces":2,"decimal":"
|
|
99
|
-
<h1 data-countup='{"decimalPlaces":2,"decimal":"^"}'>3.12</h1>
|
|
100
|
-
<h1 data-countup='{"decimalPlaces":2,"decimal":":"}'>3.12</h1>
|
|
134
|
+
<h1 data-countup='{"decimalPlaces":2,"decimal":","}'>3.12</h1>
|
|
101
135
|
```
|
|
102
136
|
|
|
103
137
|
## Prefix
|
|
104
138
|
|
|
105
139
|
Set the countup prefix using `prefix` and specifying the prefix you want to add, for instance a currency symbol.
|
|
106
140
|
|
|
107
|
-
```html
|
|
108
|
-
<
|
|
141
|
+
```html
|
|
142
|
+
<h1 data-countup='{"prefix":"$"}'>30000</h1>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Look at the example below to see how the prefix affects the animation.
|
|
109
146
|
|
|
147
|
+
```html example libs="countup" centered vertical separated
|
|
110
148
|
<h1 data-countup='{"prefix":"$"}'>30000</h1>
|
|
111
149
|
<h1 data-countup='{"prefix":"€"}'>30000</h1>
|
|
112
|
-
<h1 data-countup='{"prefix":"£"}'>30000</h1>
|
|
113
150
|
```
|
|
114
151
|
|
|
115
152
|
## Suffix
|
|
116
153
|
|
|
117
|
-
Set the countup suffix using `suffix
|
|
118
|
-
|
|
119
|
-
```html example
|
|
120
|
-
<script src="$TABLER_CDN/dist/libs/countup.js/dist/countUp.js"></script>
|
|
154
|
+
Set the countup suffix using `suffix` and specifying the suffix you want to add, for instance a percentage symbol.
|
|
121
155
|
|
|
122
|
-
|
|
123
|
-
<h1 data-countup='{"suffix":"
|
|
124
|
-
<h1 data-countup='{"suffix":"k"}'>30</h1>
|
|
156
|
+
```html
|
|
157
|
+
<h1 data-countup='{"suffix":"%"}'>300</h1>
|
|
125
158
|
```
|
|
126
159
|
|
|
127
|
-
|
|
160
|
+
Look at the example below to see how the suffix affects the animation.
|
|
128
161
|
|
|
129
|
-
```html example
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
<h1 data-countup='{"duration":6,"startVal":12345,"decimalPlaces":2,"separator":" ","prefix":"$"}'>64547834.76</h1>
|
|
162
|
+
```html example libs="countup" centered vertical separated
|
|
163
|
+
<h1 data-countup='{"suffix":"%"}'>300</h1>
|
|
164
|
+
<h1 data-countup='{"suffix":"‰"}'>300</h1>
|
|
133
165
|
```
|
|
134
|
-
|
|
135
|
-
For more advanced features of countups, click [**here**](https://inorganik.github.io/countUp.js/) and see what more you can do.
|
|
@@ -4,15 +4,36 @@ summary: Dropzone is a simple JavaScript library that helps you add file drag an
|
|
|
4
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
|
|
|
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>
|
|
16
37
|
<script>
|
|
17
38
|
document.addEventListener("DOMContentLoaded", function() {
|
|
18
39
|
new Dropzone("#dropzone-default")
|
|
@@ -22,13 +43,20 @@ description: Drag-and-drop file upload tool.
|
|
|
22
43
|
|
|
23
44
|
## Add multiple files
|
|
24
45
|
|
|
25
|
-
|
|
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"
|
|
26
55
|
<form class="dropzone" id="dropzone-mulitple" action="." autocomplete="off" novalidate>
|
|
27
56
|
<div class="fallback">
|
|
28
57
|
<input name="file" type="file" multiple />
|
|
29
58
|
</div>
|
|
30
59
|
</form>
|
|
31
|
-
|
|
32
60
|
<script>
|
|
33
61
|
document.addEventListener("DOMContentLoaded", function() {
|
|
34
62
|
new Dropzone("#dropzone-mulitple")
|
|
@@ -38,7 +66,9 @@ description: Drag-and-drop file upload tool.
|
|
|
38
66
|
|
|
39
67
|
## Custom Dropzone
|
|
40
68
|
|
|
41
|
-
|
|
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"
|
|
42
72
|
<form class="dropzone" id="dropzone-custom" action="." autocomplete="off" novalidate>
|
|
43
73
|
<div class="fallback">
|
|
44
74
|
<input name="file" type="file" />
|
|
@@ -48,10 +78,11 @@ description: Drag-and-drop file upload tool.
|
|
|
48
78
|
<span class="dropzone-msg-desc">Your custom description here</span>
|
|
49
79
|
</div>
|
|
50
80
|
</form>
|
|
51
|
-
|
|
52
81
|
<script>
|
|
53
82
|
document.addEventListener("DOMContentLoaded", function() {
|
|
54
83
|
new Dropzone("#dropzone-custom")
|
|
55
84
|
})
|
|
56
85
|
</script>
|
|
57
86
|
```
|
|
87
|
+
|
|
88
|
+
By customizing the drop area, you can align the file upload process with your application’s branding or specific requirements.
|