@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.
Files changed (273) hide show
  1. package/LICENSE +21 -0
  2. package/dist/css/tabler-flags.css +2 -2
  3. package/dist/css/tabler-flags.css.map +1 -1
  4. package/dist/css/tabler-flags.min.css +2 -2
  5. package/dist/css/tabler-flags.min.css.map +1 -1
  6. package/dist/css/tabler-flags.rtl.css +2 -2
  7. package/dist/css/tabler-flags.rtl.css.map +1 -1
  8. package/dist/css/tabler-flags.rtl.min.css +2 -2
  9. package/dist/css/tabler-flags.rtl.min.css.map +1 -1
  10. package/dist/css/tabler-marketing.css +6 -6
  11. package/dist/css/tabler-marketing.css.map +1 -1
  12. package/dist/css/tabler-marketing.min.css +2 -2
  13. package/dist/css/tabler-marketing.min.css.map +1 -1
  14. package/dist/css/tabler-marketing.rtl.css +6 -6
  15. package/dist/css/tabler-marketing.rtl.css.map +1 -1
  16. package/dist/css/tabler-marketing.rtl.min.css +2 -2
  17. package/dist/css/tabler-marketing.rtl.min.css.map +1 -1
  18. package/dist/css/tabler-payments.css +1 -1
  19. package/dist/css/tabler-payments.min.css +1 -1
  20. package/dist/css/tabler-payments.rtl.css +1 -1
  21. package/dist/css/tabler-payments.rtl.min.css +1 -1
  22. package/dist/css/tabler-props.css +448 -0
  23. package/dist/css/tabler-props.css.map +1 -0
  24. package/dist/css/tabler-props.min.css +8 -0
  25. package/dist/css/tabler-props.min.css.map +1 -0
  26. package/dist/css/tabler-props.rtl.css +447 -0
  27. package/dist/css/tabler-props.rtl.css.map +1 -0
  28. package/dist/css/tabler-props.rtl.min.css +8 -0
  29. package/dist/css/tabler-props.rtl.min.css.map +1 -0
  30. package/dist/css/tabler-socials.css +1 -1
  31. package/dist/css/tabler-socials.min.css +1 -1
  32. package/dist/css/tabler-socials.rtl.css +1 -1
  33. package/dist/css/tabler-socials.rtl.min.css +1 -1
  34. package/dist/css/tabler-themes.css +213 -0
  35. package/dist/css/tabler-themes.css.map +1 -0
  36. package/dist/css/tabler-themes.min.css +8 -0
  37. package/dist/css/tabler-themes.min.css.map +1 -0
  38. package/dist/css/tabler-themes.rtl.css +212 -0
  39. package/dist/css/tabler-themes.rtl.css.map +1 -0
  40. package/dist/css/tabler-themes.rtl.min.css +8 -0
  41. package/dist/css/tabler-themes.rtl.min.css.map +1 -0
  42. package/dist/css/tabler-vendors.css +31 -16
  43. package/dist/css/tabler-vendors.css.map +1 -1
  44. package/dist/css/tabler-vendors.min.css +2 -2
  45. package/dist/css/tabler-vendors.min.css.map +1 -1
  46. package/dist/css/tabler-vendors.rtl.css +31 -16
  47. package/dist/css/tabler-vendors.rtl.css.map +1 -1
  48. package/dist/css/tabler-vendors.rtl.min.css +2 -2
  49. package/dist/css/tabler-vendors.rtl.min.css.map +1 -1
  50. package/dist/css/tabler.css +7662 -8392
  51. package/dist/css/tabler.css.map +1 -1
  52. package/dist/css/tabler.min.css +2 -2
  53. package/dist/css/tabler.min.css.map +1 -1
  54. package/dist/css/tabler.rtl.css +7751 -8481
  55. package/dist/css/tabler.rtl.css.map +1 -1
  56. package/dist/css/tabler.rtl.min.css +2 -2
  57. package/dist/css/tabler.rtl.min.css.map +1 -1
  58. package/dist/img/flags/kr.svg +1 -1
  59. package/dist/js/tabler-theme.esm.js +38 -0
  60. package/dist/js/tabler-theme.esm.js.map +1 -0
  61. package/dist/js/tabler-theme.esm.min.js +8 -0
  62. package/dist/js/tabler-theme.esm.min.js.map +1 -0
  63. package/dist/js/tabler-theme.js +45 -0
  64. package/dist/js/tabler-theme.js.map +1 -0
  65. package/dist/js/tabler-theme.min.js +8 -0
  66. package/dist/js/tabler-theme.min.js.map +1 -0
  67. package/dist/js/tabler.esm.js +28 -21
  68. package/dist/js/tabler.esm.js.map +1 -1
  69. package/dist/js/tabler.esm.min.js +5 -5
  70. package/dist/js/tabler.esm.min.js.map +1 -1
  71. package/dist/js/tabler.js +36 -24
  72. package/dist/js/tabler.js.map +1 -1
  73. package/dist/js/tabler.min.js +5 -5
  74. package/dist/js/tabler.min.js.map +1 -1
  75. package/js/src/autosize.js +1 -4
  76. package/js/src/input-mask.js +1 -3
  77. package/js/tabler-theme.js +35 -0
  78. package/js/{tabler.esm.js → tabler.js} +16 -0
  79. package/package.json +10 -8
  80. package/scss/_bootstrap-components.scss +0 -5
  81. package/scss/_core.scss +4 -0
  82. package/scss/_props.scss +91 -0
  83. package/scss/_utilities.scss +30 -1
  84. package/scss/_variables-dark.scss +1 -1
  85. package/scss/_variables.scss +79 -60
  86. package/scss/helpers/_index.scss +143 -0
  87. package/scss/layout/_core.scss +1 -0
  88. package/scss/layout/_dark.scss +33 -38
  89. package/scss/layout/_navbar.scss +2 -1
  90. package/scss/layout/_page.scss +1 -0
  91. package/scss/layout/_root.scss +26 -34
  92. package/scss/marketing/_core.scss +1 -1
  93. package/scss/marketing/_pricing.scss +1 -1
  94. package/scss/mixins/_mixins.scss +6 -6
  95. package/scss/tabler-props.scss +1 -0
  96. package/scss/tabler-themes.scss +121 -0
  97. package/scss/tabler-vendors.scss +3 -1
  98. package/scss/tabler.scss +0 -1
  99. package/scss/ui/_accordion.scss +31 -26
  100. package/scss/ui/_alerts.scss +19 -8
  101. package/scss/ui/_avatars.scss +35 -9
  102. package/scss/ui/_badges.scss +1 -1
  103. package/scss/ui/_buttons.scss +15 -17
  104. package/scss/ui/_close.scss +55 -2
  105. package/scss/ui/_dropdowns.scss +1 -0
  106. package/scss/ui/_forms.scss +12 -2
  107. package/scss/ui/_markdown.scss +10 -1
  108. package/scss/ui/_nav.scss +11 -1
  109. package/scss/ui/_offcanvas.scss +1 -1
  110. package/scss/ui/_pagination.scss +2 -0
  111. package/scss/ui/_signature.scss +4 -2
  112. package/scss/ui/_steps.scss +4 -0
  113. package/scss/ui/_tables.scss +16 -0
  114. package/scss/ui/_tags.scss +1 -1
  115. package/scss/ui/_type.scss +69 -7
  116. package/scss/ui/forms/_form-colorinput.scss +1 -1
  117. package/scss/ui/forms/_form-imagecheck.scss +6 -5
  118. package/scss/ui/forms/_form-selectgroup.scss +1 -1
  119. package/scss/utils/_colors.scss +58 -11
  120. package/scss/utils/_scroll.scss +0 -2
  121. package/scss/vendor/_coloris.scss +6 -1
  122. package/scss/vendor/_fslightbox.scss +1 -1
  123. package/scss/vendor/_jsvectormap.scss +2 -3
  124. package/scss/vendor/_litepicker.scss +1 -0
  125. package/scss/vendor/_nouislider.scss +0 -2
  126. package/scss/vendor/_tinymce.scss +3 -3
  127. package/scss/vendor/_tom-select.scss +7 -4
  128. package/scss/vendor/_turbo.scss +3 -0
  129. package/scss/vendor/_wysiwyg.scss +34 -0
  130. package/docs/emails/index.mdx +0 -14
  131. package/docs/emails/introduction/compiled-html.mdx +0 -29
  132. package/docs/emails/introduction/contents.mdx +0 -63
  133. package/docs/emails/introduction/index.mdx +0 -9
  134. package/docs/emails/introduction/source-html.mdx +0 -26
  135. package/docs/icons/index.mdx +0 -13
  136. package/docs/icons/libraries/index.mdx +0 -5
  137. package/docs/icons/libraries/preact.mdx +0 -42
  138. package/docs/icons/libraries/react.mdx +0 -42
  139. package/docs/icons/libraries/solidjs.mdx +0 -42
  140. package/docs/icons/libraries/svelte.mdx +0 -43
  141. package/docs/icons/libraries/vue.mdx +0 -50
  142. package/docs/icons/libraries/webfont.mdx +0 -60
  143. package/docs/icons/plugins/figma.mdx +0 -15
  144. package/docs/icons/plugins/index.mdx +0 -4
  145. package/docs/icons/static-files/eps.mdx +0 -15
  146. package/docs/icons/static-files/index.mdx +0 -5
  147. package/docs/icons/static-files/pdf.mdx +0 -15
  148. package/docs/icons/static-files/png.mdx +0 -31
  149. package/docs/icons/static-files/svg.mdx +0 -85
  150. package/docs/illustrations/index.mdx +0 -8
  151. package/docs/illustrations/introduction/contents.mdx +0 -77
  152. package/docs/illustrations/introduction/customization.mdx +0 -1198
  153. package/docs/illustrations/introduction/index.mdx +0 -5
  154. package/docs/illustrations/introduction/license.mdx +0 -90
  155. package/docs/img/browsers/brave.svg +0 -1
  156. package/docs/img/browsers/chrome.svg +0 -1
  157. package/docs/img/browsers/edge.svg +0 -1
  158. package/docs/img/browsers/electron.svg +0 -1
  159. package/docs/img/browsers/firefox.svg +0 -1
  160. package/docs/img/browsers/internet-explorer.svg +0 -1
  161. package/docs/img/browsers/opera.svg +0 -1
  162. package/docs/img/browsers/safari.svg +0 -1
  163. package/docs/img/browsers/vivaldi.svg +0 -1
  164. package/docs/img/cover-illustrations-dark.png +0 -0
  165. package/docs/img/cover-illustrations.png +0 -0
  166. package/docs/img/cover-tabler-dark.png +0 -0
  167. package/docs/img/cover-tabler.png +0 -0
  168. package/docs/img/icons/figma-plugin.png +0 -0
  169. package/docs/img/icons/package-angular-dark.png +0 -0
  170. package/docs/img/icons/package-angular.png +0 -0
  171. package/docs/img/icons/package-eps-dark.png +0 -0
  172. package/docs/img/icons/package-eps.png +0 -0
  173. package/docs/img/icons/package-js-dark.png +0 -0
  174. package/docs/img/icons/package-js.png +0 -0
  175. package/docs/img/icons/package-pdf-dark.png +0 -0
  176. package/docs/img/icons/package-pdf.png +0 -0
  177. package/docs/img/icons/package-png-dark.png +0 -0
  178. package/docs/img/icons/package-png.png +0 -0
  179. package/docs/img/icons/package-preact-dark.png +0 -0
  180. package/docs/img/icons/package-preact.png +0 -0
  181. package/docs/img/icons/package-react-dark.png +0 -0
  182. package/docs/img/icons/package-react-native-dark.png +0 -0
  183. package/docs/img/icons/package-react-native.png +0 -0
  184. package/docs/img/icons/package-react.png +0 -0
  185. package/docs/img/icons/package-solidjs-dark.png +0 -0
  186. package/docs/img/icons/package-solidjs.png +0 -0
  187. package/docs/img/icons/package-sprite-dark.png +0 -0
  188. package/docs/img/icons/package-sprite.png +0 -0
  189. package/docs/img/icons/package-svelte-dark.png +0 -0
  190. package/docs/img/icons/package-svelte.png +0 -0
  191. package/docs/img/icons/package-svg-dark.png +0 -0
  192. package/docs/img/icons/package-svg.png +0 -0
  193. package/docs/img/icons/package-vue-dark.png +0 -0
  194. package/docs/img/icons/package-vue.png +0 -0
  195. package/docs/img/icons/package-webfont-dark.png +0 -0
  196. package/docs/img/icons/package-webfont.png +0 -0
  197. package/docs/index.mdx +0 -16
  198. package/docs/ui/base/colors.mdx +0 -83
  199. package/docs/ui/base/index.mdx +0 -6
  200. package/docs/ui/base/typography.mdx +0 -311
  201. package/docs/ui/components/alerts.mdx +0 -406
  202. package/docs/ui/components/autosize.mdx +0 -25
  203. package/docs/ui/components/avatars.mdx +0 -227
  204. package/docs/ui/components/badges.mdx +0 -112
  205. package/docs/ui/components/breadcrumb.mdx +0 -199
  206. package/docs/ui/components/buttons.mdx +0 -1213
  207. package/docs/ui/components/cards.mdx +0 -417
  208. package/docs/ui/components/carousel.mdx +0 -459
  209. package/docs/ui/components/charts.mdx +0 -697
  210. package/docs/ui/components/countup.mdx +0 -165
  211. package/docs/ui/components/datagrid.mdx +0 -120
  212. package/docs/ui/components/divider.mdx +0 -68
  213. package/docs/ui/components/dropdowns.mdx +0 -302
  214. package/docs/ui/components/dropzone.mdx +0 -88
  215. package/docs/ui/components/empty.mdx +0 -149
  216. package/docs/ui/components/icons.mdx +0 -392
  217. package/docs/ui/components/index.mdx +0 -6
  218. package/docs/ui/components/inline-player.mdx +0 -58
  219. package/docs/ui/components/modals.mdx +0 -297
  220. package/docs/ui/components/offcanvas.mdx +0 -70
  221. package/docs/ui/components/placeholder.mdx +0 -273
  222. package/docs/ui/components/popover.mdx +0 -142
  223. package/docs/ui/components/progress.mdx +0 -241
  224. package/docs/ui/components/range-slider.mdx +0 -32
  225. package/docs/ui/components/ribbons.mdx +0 -207
  226. package/docs/ui/components/segmented-control.mdx +0 -401
  227. package/docs/ui/components/spinners.mdx +0 -135
  228. package/docs/ui/components/statuses.mdx +0 -322
  229. package/docs/ui/components/steps.mdx +0 -174
  230. package/docs/ui/components/switch-icon.mdx +0 -386
  231. package/docs/ui/components/tables.mdx +0 -397
  232. package/docs/ui/components/tabs.mdx +0 -396
  233. package/docs/ui/components/timelines.mdx +0 -697
  234. package/docs/ui/components/tinymce.mdx +0 -46
  235. package/docs/ui/components/toasts.mdx +0 -126
  236. package/docs/ui/components/tooltips.mdx +0 -65
  237. package/docs/ui/components/tracking.mdx +0 -548
  238. package/docs/ui/components/vector-maps.mdx +0 -166
  239. package/docs/ui/forms/form-color-check.mdx +0 -220
  240. package/docs/ui/forms/form-elements.mdx +0 -632
  241. package/docs/ui/forms/form-fieldset.mdx +0 -45
  242. package/docs/ui/forms/form-helpers.mdx +0 -91
  243. package/docs/ui/forms/form-image-check.mdx +0 -213
  244. package/docs/ui/forms/form-input-mask.mdx +0 -61
  245. package/docs/ui/forms/form-selectboxes.mdx +0 -398
  246. package/docs/ui/forms/form-validation.mdx +0 -62
  247. package/docs/ui/forms/index.mdx +0 -6
  248. package/docs/ui/getting-started/browser-support.mdx +0 -28
  249. package/docs/ui/getting-started/customize.mdx +0 -28
  250. package/docs/ui/getting-started/download.mdx +0 -44
  251. package/docs/ui/getting-started/faq.mdx +0 -30
  252. package/docs/ui/getting-started/how-to-contribute.mdx +0 -84
  253. package/docs/ui/getting-started/index.mdx +0 -16
  254. package/docs/ui/getting-started/installation.mdx +0 -67
  255. package/docs/ui/getting-started/license.mdx +0 -30
  256. package/docs/ui/index.mdx +0 -8
  257. package/docs/ui/layout/index.mdx +0 -6
  258. package/docs/ui/layout/navbars.mdx +0 -164
  259. package/docs/ui/layout/navs-tabls.mdx +0 -201
  260. package/docs/ui/layout/page-headers.mdx +0 -365
  261. package/docs/ui/layout/page-layouts.mdx +0 -213
  262. package/docs/ui/plugins/flags.mdx +0 -316
  263. package/docs/ui/plugins/index.mdx +0 -6
  264. package/docs/ui/plugins/payments.mdx +0 -152
  265. package/docs/ui/plugins/social-icons.mdx +0 -135
  266. package/docs/ui/utilities/borders.mdx +0 -260
  267. package/docs/ui/utilities/cursors.mdx +0 -63
  268. package/docs/ui/utilities/index.mdx +0 -5
  269. package/docs/ui/utilities/interactions.mdx +0 -26
  270. package/docs/ui/utilities/margins.mdx +0 -234
  271. package/docs/ui/utilities/vertical-align.mdx +0 -66
  272. package/docs/ui/utilities/visually-hidden.mdx +0 -12
  273. package/js/tabler.umd.js +0 -15
@@ -1,207 +0,0 @@
1
- ---
2
- title: Ribbons
3
- summary: Ribbons are graphical elements which attract users' attention to a given element of an interface and make it stand out.
4
- description: Highlight elements with graphical ribbons.
5
- ---
6
-
7
- ## Default markup
8
-
9
- Use the `ribbon` class to add the default ribbon to any section of your interface.
10
-
11
- ```html example columns={1} centered background="base"
12
- <div class="card">
13
- <div class="card-body" style="height: 5rem"></div>
14
- <div class="ribbon">
15
- <svg
16
- xmlns="http://www.w3.org/2000/svg"
17
- class="icon"
18
- width="24"
19
- height="24"
20
- viewBox="0 0 24 24"
21
- stroke-width="2"
22
- stroke="currentColor"
23
- fill="none"
24
- stroke-linecap="round"
25
- stroke-linejoin="round"
26
- >
27
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
28
- <path
29
- d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"
30
- />
31
- </svg>
32
- </div>
33
- </div>
34
- ```
35
-
36
- ```html
37
- <div class="card">
38
- <div class="card-body"></div>
39
- <div class="ribbon">
40
- <!-- SVG icon from http://tabler.io/icons/icon/star -->
41
- <svg>...</svg>
42
- </div>
43
- </div>
44
- ```
45
-
46
- ## Ribbon position
47
-
48
- You can change the position of a ribbon by adding one of the following classes to the element:
49
-
50
- - `ribbon-top` - moves it to the top
51
- - `ribbon-end` - moves it to the right
52
- - `ribbon-bottom` - moves it to the bottom
53
- - `ribbon-start` - moves it to the left
54
-
55
- Using multiple classes at once will give you more position options. For example, the following class: `.ribbon.ribbon-top.ribbon-left` will move the ribbon to the top left corner.
56
-
57
- ```html example columns={1} centered background="base"
58
- <div class="card">
59
- <div class="card-body" style="height: 5rem"></div>
60
- <div class="ribbon ribbon-top ribbon-start">
61
- <svg
62
- xmlns="http://www.w3.org/2000/svg"
63
- class="icon"
64
- width="24"
65
- height="24"
66
- viewBox="0 0 24 24"
67
- stroke-width="2"
68
- stroke="currentColor"
69
- fill="none"
70
- stroke-linecap="round"
71
- stroke-linejoin="round"
72
- >
73
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
74
- <path
75
- d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"
76
- />
77
- </svg>
78
- </div>
79
- </div>
80
- ```
81
-
82
- ```html
83
- <div class="card">
84
- <div class="card-body"></div>
85
- <div class="ribbon ribbon-top ribbon-start">
86
- <!-- SVG icon from http://tabler.io/icons/icon/star -->
87
- <svg>...</svg>
88
- </div>
89
- </div>
90
- ```
91
-
92
- ## Ribbon color
93
-
94
- Customize the ribbon's background color. You can click [here](/docs/ui/base/colors) to see the list of available colors.
95
-
96
- ```html example columns={1} centered background="base"
97
- <div class="card">
98
- <div class="card-body" style="height: 5rem"></div>
99
- <div class="ribbon bg-red">
100
- <svg
101
- xmlns="http://www.w3.org/2000/svg"
102
- class="icon"
103
- width="24"
104
- height="24"
105
- viewBox="0 0 24 24"
106
- stroke-width="2"
107
- stroke="currentColor"
108
- fill="none"
109
- stroke-linecap="round"
110
- stroke-linejoin="round"
111
- >
112
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
113
- <path
114
- d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"
115
- />
116
- </svg>
117
- </div>
118
- </div>
119
- ```
120
-
121
- ```html
122
- <div class="card">
123
- <div class="card-body"></div>
124
- <div class="ribbon bg-red">
125
- <!-- SVG icon from http://tabler.io/icons/icon/star -->
126
- <svg>...</svg>
127
- </div>
128
- </div>
129
- ```
130
-
131
- ## Ribbon text
132
-
133
- Add your own text to a ribbon to display any additional information and make it easy to spot for users.
134
-
135
- ```html example columns={1} centered background="base"
136
- <div class="card">
137
- <div class="card-body" style="height: 5rem"></div>
138
- <div class="ribbon bg-green">
139
- <svg
140
- xmlns="http://www.w3.org/2000/svg"
141
- class="icon"
142
- width="24"
143
- height="24"
144
- viewBox="0 0 24 24"
145
- stroke-width="2"
146
- stroke="currentColor"
147
- fill="none"
148
- stroke-linecap="round"
149
- stroke-linejoin="round"
150
- >
151
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
152
- <path
153
- d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"
154
- />
155
- </svg>
156
- </div>
157
- </div>
158
- ```
159
-
160
- ```html
161
- <div class="card">
162
- <div class="card-body"></div>
163
- <div class="ribbon bg-green">
164
- <!-- SVG icon from http://tabler.io/icons/icon/star -->
165
- <svg>...</svg>
166
- </div>
167
- </div>
168
- ```
169
-
170
- ## Ribbon style
171
-
172
- Change the style of a ribbon to make it go well with your interface design.
173
-
174
- ```html example columns={1} centered background="base"
175
- <div class="card w-100">
176
- <div class="card-body" style="height: 5rem"></div>
177
- <div class="ribbon ribbon-bookmark bg-orange">
178
- <svg
179
- xmlns="http://www.w3.org/2000/svg"
180
- class="icon"
181
- width="24"
182
- height="24"
183
- viewBox="0 0 24 24"
184
- stroke-width="2"
185
- stroke="currentColor"
186
- fill="none"
187
- stroke-linecap="round"
188
- stroke-linejoin="round"
189
- >
190
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
191
- <path
192
- d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"
193
- />
194
- </svg>
195
- </div>
196
- </div>
197
- ```
198
-
199
- ```html
200
- <div class="card">
201
- <div class="card-body"></div>
202
- <div class="ribbon ribbon-bookmark bg-orange">
203
- <!-- SVG icon from http://tabler.io/icons/icon/star -->
204
- <svg>...</svg>
205
- </div>
206
- </div>
207
- ```
@@ -1,401 +0,0 @@
1
- ---
2
- title: Segmented Control
3
- summary: A segmented control is a set of two or more segments, each of which functions as a mutually exclusive button. A segmented control is used to display a set of mutually exclusive options.
4
- ---
5
-
6
- To create a segmented control, use the `nav` element with the `nav-segmented` class. Inside the `nav` element, add `button` or `a` elements with the `nav-link` class. The `nav-link` class is used to style the buttons as links.
7
-
8
- ```html
9
- <nav class="nav nav-segmented" role="tablist">
10
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="true" aria-current="page">
11
- First
12
- </button>
13
- ...
14
- </nav>
15
- ```
16
-
17
- See the example below to see how the segmented control looks.
18
-
19
- ```html example centered background="white"
20
- <nav class="nav nav-segmented" role="tablist">
21
- <button
22
- class="nav-link active"
23
- role="tab"
24
- data-bs-toggle="tab"
25
- aria-selected="true"
26
- aria-current="page"
27
- >
28
- First
29
- </button>
30
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
31
- Second
32
- </button>
33
- <button
34
- class="nav-link"
35
- disabled
36
- role="tab"
37
- data-bs-toggle="tab"
38
- aria-selected="false"
39
- tabindex="-1"
40
- >
41
- Disabled
42
- </button>
43
- </nav>
44
- ```
45
-
46
- ## Full width
47
-
48
- To make the segmented control full width, add the `w-100` class to the `nav` element. It will take up the full width of its parent container.
49
-
50
- ```html
51
- <nav class="nav nav-segmented w-100" role="tablist">...</nav>
52
- ```
53
-
54
- The results can be seen in the example below.
55
-
56
- ```html example vcentered background="white"
57
- <nav class="nav nav-segmented w-100" role="tablist">
58
- <button
59
- class="nav-link active"
60
- role="tab"
61
- data-bs-toggle="tab"
62
- aria-selected="true"
63
- aria-current="page"
64
- >
65
- Daily
66
- </button>
67
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
68
- Weekly
69
- </button>
70
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
71
- Monthly
72
- </button>
73
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
74
- Quarterly
75
- </button>
76
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
77
- Yearly
78
- </button>
79
- </nav>
80
- ```
81
-
82
- ## With emojis
83
-
84
- You can also use emojis in the segmented control. To do this, add the emoji inside the `button` element.
85
-
86
- ```html example centered background="white"
87
- <nav class="nav nav-segmented nav-1" role="tablist">
88
- <button
89
- class="nav-link active"
90
- role="tab"
91
- data-bs-toggle="tab"
92
- aria-selected="true"
93
- aria-current="page"
94
- >
95
- 👦
96
- </button>
97
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
98
- 👦🏿
99
- </button>
100
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
101
- 👦🏾
102
- </button>
103
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
104
- 👦🏽
105
- </button>
106
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
107
- 👦🏼
108
- </button>
109
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
110
- 👦🏻
111
- </button>
112
- </nav>
113
- ```
114
-
115
- ## With icons
116
-
117
- You can also use icons in the segmented control. To do this, add the icon inside the `button` element.
118
-
119
-
120
- ```html example centered background="white"
121
- <nav class="nav nav-segmented" role="tablist">
122
- <button
123
- class="nav-link active"
124
- role="tab"
125
- data-bs-toggle="tab"
126
- aria-selected="true"
127
- aria-current="page"
128
- >
129
- <!-- Download SVG icon from http://tabler.io/icons/icon/list -->
130
- <svg
131
- xmlns="http://www.w3.org/2000/svg"
132
- width="24"
133
- height="24"
134
- viewBox="0 0 24 24"
135
- fill="none"
136
- stroke="currentColor"
137
- stroke-width="2"
138
- stroke-linecap="round"
139
- stroke-linejoin="round"
140
- class="icon nav-link-icon icon-2"
141
- >
142
- <path d="M9 6l11 0"></path>
143
- <path d="M9 12l11 0"></path>
144
- <path d="M9 18l11 0"></path>
145
- <path d="M5 6l0 .01"></path>
146
- <path d="M5 12l0 .01"></path>
147
- <path d="M5 18l0 .01"></path>
148
- </svg>
149
- List
150
- </button>
151
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
152
- <!-- Download SVG icon from http://tabler.io/icons/icon/layout -->
153
- <svg
154
- xmlns="http://www.w3.org/2000/svg"
155
- width="24"
156
- height="24"
157
- viewBox="0 0 24 24"
158
- fill="none"
159
- stroke="currentColor"
160
- stroke-width="2"
161
- stroke-linecap="round"
162
- stroke-linejoin="round"
163
- class="icon nav-link-icon icon-2"
164
- >
165
- <path d="M4 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"></path>
166
- <path
167
- d="M4 13m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"
168
- ></path>
169
- <path
170
- d="M14 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"
171
- ></path>
172
- </svg>
173
- Kanban
174
- </button>
175
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
176
- <!-- Download SVG icon from http://tabler.io/icons/icon/calendar -->
177
- <svg
178
- xmlns="http://www.w3.org/2000/svg"
179
- width="24"
180
- height="24"
181
- viewBox="0 0 24 24"
182
- fill="none"
183
- stroke="currentColor"
184
- stroke-width="2"
185
- stroke-linecap="round"
186
- stroke-linejoin="round"
187
- class="icon nav-link-icon icon-2"
188
- >
189
- <path
190
- d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"
191
- ></path>
192
- <path d="M16 3v4"></path>
193
- <path d="M8 3v4"></path>
194
- <path d="M4 11h16"></path>
195
- <path d="M11 15h1"></path>
196
- <path d="M12 15v3"></path>
197
- </svg>
198
- Calendar
199
- </button>
200
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
201
- <!-- Download SVG icon from http://tabler.io/icons/icon/files -->
202
- <svg
203
- xmlns="http://www.w3.org/2000/svg"
204
- width="24"
205
- height="24"
206
- viewBox="0 0 24 24"
207
- fill="none"
208
- stroke="currentColor"
209
- stroke-width="2"
210
- stroke-linecap="round"
211
- stroke-linejoin="round"
212
- class="icon nav-link-icon icon-2"
213
- >
214
- <path d="M15 3v4a1 1 0 0 0 1 1h4"></path>
215
- <path d="M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2z"></path>
216
- <path d="M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"></path>
217
- </svg>
218
- Files
219
- </button>
220
- </nav>
221
- ```
222
-
223
- ## Vertical direction
224
-
225
- To create a vertical segmented control, add the `nav-segmented-vertical` class to the `nav` element.
226
-
227
- ```html
228
- <nav class="nav nav-segmented-vertical" role="tablist">...</nav>
229
- ```
230
-
231
- The results can be seen in the example below.
232
-
233
- ```html example centered background="white"
234
- <nav class="nav nav-segmented nav-segmented-vertical" role="tablist">
235
- <button
236
- class="nav-link active"
237
- role="tab"
238
- data-bs-toggle="tab"
239
- aria-selected="true"
240
- aria-current="page"
241
- >
242
- <!-- Download SVG icon from http://tabler.io/icons/icon/list -->
243
- <svg
244
- xmlns="http://www.w3.org/2000/svg"
245
- width="24"
246
- height="24"
247
- viewBox="0 0 24 24"
248
- fill="none"
249
- stroke="currentColor"
250
- stroke-width="2"
251
- stroke-linecap="round"
252
- stroke-linejoin="round"
253
- class="icon nav-link-icon icon-2"
254
- >
255
- <path d="M9 6l11 0"></path>
256
- <path d="M9 12l11 0"></path>
257
- <path d="M9 18l11 0"></path>
258
- <path d="M5 6l0 .01"></path>
259
- <path d="M5 12l0 .01"></path>
260
- <path d="M5 18l0 .01"></path>
261
- </svg>
262
- List
263
- </button>
264
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
265
- <!-- Download SVG icon from http://tabler.io/icons/icon/layout -->
266
- <svg
267
- xmlns="http://www.w3.org/2000/svg"
268
- width="24"
269
- height="24"
270
- viewBox="0 0 24 24"
271
- fill="none"
272
- stroke="currentColor"
273
- stroke-width="2"
274
- stroke-linecap="round"
275
- stroke-linejoin="round"
276
- class="icon nav-link-icon icon-2"
277
- >
278
- <path d="M4 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"></path>
279
- <path
280
- d="M4 13m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"
281
- ></path>
282
- <path
283
- d="M14 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"
284
- ></path>
285
- </svg>
286
- Kanban
287
- </button>
288
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
289
- <!-- Download SVG icon from http://tabler.io/icons/icon/calendar -->
290
- <svg
291
- xmlns="http://www.w3.org/2000/svg"
292
- width="24"
293
- height="24"
294
- viewBox="0 0 24 24"
295
- fill="none"
296
- stroke="currentColor"
297
- stroke-width="2"
298
- stroke-linecap="round"
299
- stroke-linejoin="round"
300
- class="icon nav-link-icon icon-2"
301
- >
302
- <path
303
- d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"
304
- ></path>
305
- <path d="M16 3v4"></path>
306
- <path d="M8 3v4"></path>
307
- <path d="M4 11h16"></path>
308
- <path d="M11 15h1"></path>
309
- <path d="M12 15v3"></path>
310
- </svg>
311
- Calendar
312
- </button>
313
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
314
- <!-- Download SVG icon from http://tabler.io/icons/icon/files -->
315
- <svg
316
- xmlns="http://www.w3.org/2000/svg"
317
- width="24"
318
- height="24"
319
- viewBox="0 0 24 24"
320
- fill="none"
321
- stroke="currentColor"
322
- stroke-width="2"
323
- stroke-linecap="round"
324
- stroke-linejoin="round"
325
- class="icon nav-link-icon icon-2"
326
- >
327
- <path d="M15 3v4a1 1 0 0 0 1 1h4"></path>
328
- <path d="M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2z"></path>
329
- <path d="M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"></path>
330
- </svg>
331
- Files
332
- </button>
333
- </nav>
334
- ```
335
-
336
- ## Sizes
337
-
338
- You can also change the size of the segmented control. To do this, add the `nav-sm` or `nv-lg` class to the `nav` element. The `nav-sm` class will make the segmented control smaller, while the `nav-lg` class will make it larger.
339
-
340
- ```html
341
- <nav class="nav nav-segmented nav-sm" role="tablist">...</nav>
342
- ```
343
-
344
- The results can be seen in the examples below.
345
-
346
- ```html example vertical centered background="white" separated
347
- <nav class="nav nav-segmented nav-sm" role="tablist">
348
- <button
349
- class="nav-link active"
350
- role="tab"
351
- data-bs-toggle="tab"
352
- aria-selected="true"
353
- aria-current="page"
354
- >
355
- List
356
- </button>
357
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
358
- Kanban
359
- </button>
360
- <button
361
- class="nav-link disabled"
362
- role="tab"
363
- data-bs-toggle="tab"
364
- aria-selected="false"
365
- aria-disabled="true"
366
- tabindex="-1"
367
- >
368
- Calendar
369
- </button>
370
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
371
- Files
372
- </button>
373
- </nav>
374
- <nav class="nav nav-segmented nav-lg" role="tablist">
375
- <button
376
- class="nav-link active"
377
- role="tab"
378
- data-bs-toggle="tab"
379
- aria-selected="true"
380
- aria-current="page"
381
- >
382
- List
383
- </button>
384
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
385
- Kanban
386
- </button>
387
- <button
388
- class="nav-link disabled"
389
- role="tab"
390
- data-bs-toggle="tab"
391
- aria-selected="false"
392
- aria-disabled="true"
393
- tabindex="-1"
394
- >
395
- Calendar
396
- </button>
397
- <button class="nav-link" role="tab" data-bs-toggle="tab" aria-selected="false" tabindex="-1">
398
- Files
399
- </button>
400
- </nav>
401
- ```