buttons.mdx 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  1. ---
  2. title: Buttons
  3. summary: Use button styles that best suit your designs and encourage users to take the desired actions. You can customize the button's properties to improve the user experience of your website or system, changing the size, shape, color and many more.
  4. bootstrapLink: components/buttons/
  5. description: Customizable buttons for user actions.
  6. ---
  7. ## Button tag
  8. As one of the most common elements of UI design, buttons have a very important function of engaging users within your website or app and guiding them in their actions. Use the `.btn` classes with the `<button>` element and add additional styling that will make your buttons serve their purpose and draw users' attention.
  9. ```html example centered separated height="7rem"
  10. <a href="#" class="btn" role="button">Link</a>
  11. <button class="btn">Button</button>
  12. <input type="button" class="btn" value="Input" />
  13. <input type="submit" class="btn" value="Submit" />
  14. <input type="reset" class="btn" value="Reset" />
  15. ```
  16. ## Default button
  17. The standard button creates a white background and subtle hover animation. It's meant to look and behave as an interactive element of your page.
  18. ```html example centered separated height="7rem"
  19. <a href="#" class="btn" role="button">Link</a>
  20. ```
  21. ## Button variations
  22. Use the button classes that correspond to the function of your button. The big range of available colors will help you show your button's purpose and make it easy to spot.
  23. ```html example vertical centered separated scrollable height="15rem"
  24. <a href="#" class="btn btn-primary">Primary</a>
  25. <a href="#" class="btn btn-secondary">Secondary</a>
  26. <a href="#" class="btn btn-success">Success</a>
  27. <a href="#" class="btn btn-warning">Warning</a>
  28. <a href="#" class="btn btn-danger">Danger</a>
  29. <a href="#" class="btn btn-info">Info</a>
  30. <a href="#" class="btn btn-dark">Dark</a>
  31. <a href="#" class="btn btn-light">Light</a>
  32. ```
  33. ## Disabled buttons
  34. Make buttons look inactive to show that an action is possible once the user meets certain criteria, such as completing the required fields to submit a form.
  35. ```html example vertical centered separated scrollable height="15rem"
  36. <a href="#" class="btn btn-primary disabled">Primary</a>
  37. <a href="#" class="btn btn-secondary disabled">Secondary</a>
  38. <a href="#" class="btn btn-success disabled">Success</a>
  39. <a href="#" class="btn btn-warning disabled">Warning</a>
  40. <a href="#" class="btn btn-danger disabled">Danger</a>
  41. <a href="#" class="btn btn-info disabled">Info</a>
  42. <a href="#" class="btn btn-dark disabled">Dark</a>
  43. <a href="#" class="btn btn-light disabled">Light</a>
  44. ```
  45. ## Color variations
  46. Choose the right color for your button to make it go well with your design and draw users' attention. Button colors can have a big influence on users' decisions, which is why it's important to choose them based on the intended purpose.
  47. ```html example vertical centered separated scrollable height="15rem"
  48. <a href="#" class="btn btn-blue">Blue</a>
  49. <a href="#" class="btn btn-azure">Azure</a>
  50. <a href="#" class="btn btn-indigo">Indigo</a>
  51. <a href="#" class="btn btn-purple">Purple</a>
  52. <a href="#" class="btn btn-pink">Pink</a>
  53. <a href="#" class="btn btn-red">Red</a>
  54. <a href="#" class="btn btn-orange">Orange</a>
  55. <a href="#" class="btn btn-yellow">Yellow</a>
  56. <a href="#" class="btn btn-lime">Lime</a>
  57. <a href="#" class="btn btn-green">Green</a>
  58. <a href="#" class="btn btn-teal">Teal</a>
  59. <a href="#" class="btn btn-cyan">Cyan</a>
  60. ```
  61. ## Ghost buttons
  62. Use the `.btn-ghost-*` class to make your button look simple yet aesthetically appealing. Ghost buttons help focus users' attention on the website's primary design, encouraging them to take action at the same time.
  63. ```html example vertical centered separated scrollable height="15rem"
  64. <a href="#" class="btn btn-ghost-primary">Primary</a>
  65. <a href="#" class="btn btn-ghost-secondary">Secondary</a>
  66. <a href="#" class="btn btn-ghost-success">Success</a>
  67. <a href="#" class="btn btn-ghost-warning">Warning</a>
  68. <a href="#" class="btn btn-ghost-danger">Danger</a>
  69. <a href="#" class="btn btn-ghost-info">Info</a>
  70. <a href="#" class="btn btn-ghost-dark">Dark</a>
  71. <div class="p-2 bg-dark">
  72. <a href="#" class="btn btn-ghost-light">Light</a>
  73. </div>
  74. ```
  75. ## Square buttons
  76. Use the `.btn-square` class to remove the border radius, if you want the corners of your button to be square rather than rounded.
  77. ```html example centered separated height="7rem"
  78. <a href="#" class="btn btn-square">Square button</a>
  79. ```
  80. ## Pill buttons
  81. Add the `.btn-pill` class to your button to make it rounded and give it a modern and attractive look.
  82. ```html example centered separated height="7rem"
  83. <a href="#" class="btn btn-pill">Pill button</a>
  84. ```
  85. ## Outline buttons
  86. Replace the default modifier class with the `.btn-outline-*` class, if you want to remove the color and the background of your button and give it a more subtle look. Outline buttons are perfect to use as secondary buttons, as they don't distract users from the main action.
  87. ```html example vertical centered separated scrollable height="15rem"
  88. <a href="#" class="btn btn-outline-primary">Primary</a>
  89. <a href="#" class="btn btn-outline-secondary">Secondary</a>
  90. <a href="#" class="btn btn-outline-success">Success</a>
  91. <a href="#" class="btn btn-outline-warning">Warning</a>
  92. <a href="#" class="btn btn-outline-danger">Danger</a>
  93. <a href="#" class="btn btn-outline-info">Info</a>
  94. <a href="#" class="btn btn-outline-dark">Dark</a>
  95. <a href="#" class="btn btn-outline-light">Light</a>
  96. ```
  97. ## Button size
  98. Add `.btn-lg` or `.btn-sm` to change the size of your button and differentiate those which should have primary focus from those of secondary importance. Adapt the button size to your design and encourage users to take actions.
  99. ```html example centered separated height="8rem"
  100. <button type="button" class="btn btn-primary btn-lg">Large button</button>
  101. <button type="button" class="btn btn-lg">Large button</button>
  102. ```
  103. ```html example centered separated height="7rem"
  104. <button type="button" class="btn btn-primary btn-sm">Small button</button>
  105. <button type="button" class="btn btn-sm">Small button</button>
  106. ```
  107. ## Buttons with icons
  108. Label your button with text and add an icon to communicate the action and make it easy to identify for users. Icons are easily recognized and improve the aesthetics of your button design, giving it a modern and attractive look.
  109. Icons can be found [**here**](/docs/components/icons)
  110. ```html example centered separated height="7rem"
  111. <button type="button" class="btn">
  112. <!-- SVG icon from http://tabler.io/icons/icon/upload -->
  113. <svg
  114. xmlns="http://www.w3.org/2000/svg"
  115. class="icon"
  116. width="24"
  117. height="24"
  118. viewBox="0 0 24 24"
  119. stroke-width="2"
  120. stroke="currentColor"
  121. fill="none"
  122. stroke-linecap="round"
  123. stroke-linejoin="round"
  124. >
  125. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  126. <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" />
  127. <polyline points="7 9 12 4 17 9" />
  128. <line x1="12" y1="4" x2="12" y2="16" />
  129. </svg>
  130. Upload
  131. </button>
  132. <button type="button" class="btn btn-warning">
  133. <!-- SVG icon from http://tabler.io/icons/icon/heart -->
  134. <svg
  135. xmlns="http://www.w3.org/2000/svg"
  136. class="icon"
  137. width="24"
  138. height="24"
  139. viewBox="0 0 24 24"
  140. stroke-width="2"
  141. stroke="currentColor"
  142. fill="none"
  143. stroke-linecap="round"
  144. stroke-linejoin="round"
  145. >
  146. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  147. <path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428m0 0a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572" />
  148. </svg>
  149. I like
  150. </button>
  151. <button type="button" class="btn btn-success">
  152. <!-- SVG icon from http://tabler.io/icons/icon/check -->
  153. <svg
  154. xmlns="http://www.w3.org/2000/svg"
  155. class="icon"
  156. width="24"
  157. height="24"
  158. viewBox="0 0 24 24"
  159. stroke-width="2"
  160. stroke="currentColor"
  161. fill="none"
  162. stroke-linecap="round"
  163. stroke-linejoin="round"
  164. >
  165. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  166. <path d="M5 12l5 5l10 -10" />
  167. </svg>
  168. I agree
  169. </button>
  170. <button type="button" class="btn btn-primary">
  171. <!-- SVG icon from http://tabler.io/icons/icon/plus -->
  172. <svg
  173. xmlns="http://www.w3.org/2000/svg"
  174. class="icon"
  175. width="24"
  176. height="24"
  177. viewBox="0 0 24 24"
  178. stroke-width="2"
  179. stroke="currentColor"
  180. fill="none"
  181. stroke-linecap="round"
  182. stroke-linejoin="round"
  183. >
  184. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  185. <line x1="12" y1="5" x2="12" y2="19" />
  186. <line x1="5" y1="12" x2="19" y2="12" />
  187. </svg>
  188. More
  189. </button>
  190. <button type="button" class="btn btn-danger">
  191. <!-- SVG icon from http://tabler.io/icons/icon/link -->
  192. <svg
  193. xmlns="http://www.w3.org/2000/svg"
  194. width="24"
  195. height="24"
  196. viewBox="0 0 24 24"
  197. fill="none"
  198. stroke="currentColor"
  199. stroke-width="2"
  200. stroke-linecap="round"
  201. stroke-linejoin="round"
  202. class="icon icon-tabler icons-tabler-outline icon-tabler-link"
  203. >
  204. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  205. <path d="M9 15l6 -6" />
  206. <path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" />
  207. <path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />
  208. </svg>
  209. Link
  210. </button>
  211. <button type="button" class="btn btn-info">
  212. <!-- SVG icon from http://tabler.io/icons/icon/message -->
  213. <svg
  214. xmlns="http://www.w3.org/2000/svg"
  215. width="24"
  216. height="24"
  217. viewBox="0 0 24 24"
  218. fill="none"
  219. stroke="currentColor"
  220. stroke-width="2"
  221. stroke-linecap="round"
  222. stroke-linejoin="round"
  223. class="icon icon-tabler icons-tabler-outline icon-tabler-message"
  224. >
  225. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  226. <path d="M8 9h8" />
  227. <path d="M8 13h6" />
  228. <path
  229. d="M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z"
  230. />
  231. </svg>
  232. Comment
  233. </button>
  234. ```
  235. ## Social buttons
  236. You can use the icons of popular social networking sites, which users are familiar with. Thanks to buttons with social media icons users can share content or follow a website with just one click, without leaving the website.
  237. ```html example vertical centered separated scrollable height="15rem"
  238. <a href="#" class="btn btn-facebook">
  239. <!-- SVG icon from http://tabler.io/icons/icon/brand-facebook -->
  240. <svg
  241. xmlns="http://www.w3.org/2000/svg"
  242. class="icon"
  243. width="24"
  244. height="24"
  245. viewBox="0 0 24 24"
  246. stroke-width="2"
  247. stroke="currentColor"
  248. fill="none"
  249. stroke-linecap="round"
  250. stroke-linejoin="round"
  251. >
  252. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  253. <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" />
  254. </svg>
  255. Facebook
  256. </a>
  257. <a href="#" class="btn btn-twitter">
  258. <!-- SVG icon from http://tabler.io/icons/icon/brand-twitter -->
  259. <svg
  260. xmlns="http://www.w3.org/2000/svg"
  261. class="icon"
  262. width="24"
  263. height="24"
  264. viewBox="0 0 24 24"
  265. stroke-width="2"
  266. stroke="currentColor"
  267. fill="none"
  268. stroke-linecap="round"
  269. stroke-linejoin="round"
  270. >
  271. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  272. <path
  273. d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"
  274. />
  275. </svg>
  276. Twitter
  277. </a>
  278. <a href="#" class="btn btn-google">
  279. <!-- SVG icon from http://tabler.io/icons/icon/brand-google -->
  280. <svg
  281. xmlns="http://www.w3.org/2000/svg"
  282. class="icon"
  283. width="24"
  284. height="24"
  285. viewBox="0 0 24 24"
  286. stroke-width="2"
  287. stroke="currentColor"
  288. fill="none"
  289. stroke-linecap="round"
  290. stroke-linejoin="round"
  291. >
  292. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  293. <path d="M17.788 5.108a9 9 0 1 0 3.212 6.892h-8" />
  294. </svg>
  295. Google
  296. </a>
  297. <a href="#" class="btn btn-youtube">
  298. <!-- SVG icon from http://tabler.io/icons/icon/brand-youtube -->
  299. <svg
  300. xmlns="http://www.w3.org/2000/svg"
  301. class="icon"
  302. width="24"
  303. height="24"
  304. viewBox="0 0 24 24"
  305. stroke-width="2"
  306. stroke="currentColor"
  307. fill="none"
  308. stroke-linecap="round"
  309. stroke-linejoin="round"
  310. >
  311. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  312. <rect x="3" y="5" width="18" height="14" rx="4" />
  313. <path d="M10 9l5 3l-5 3z" />
  314. </svg>
  315. Youtube
  316. </a>
  317. <a href="#" class="btn btn-vimeo">
  318. <!-- SVG icon from http://tabler.io/icons/icon/brand-vimeo -->
  319. <svg
  320. xmlns="http://www.w3.org/2000/svg"
  321. class="icon"
  322. width="24"
  323. height="24"
  324. viewBox="0 0 24 24"
  325. stroke-width="2"
  326. stroke="currentColor"
  327. fill="none"
  328. stroke-linecap="round"
  329. stroke-linejoin="round"
  330. >
  331. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  332. <path
  333. d="M3 8.5l1 1s1.5 -1.102 2 -.5c.509 .609 1.863 7.65 2.5 9c.556 1.184 1.978 2.89 4 1.5c2 -1.5 7.5 -5.5 8.5 -11.5c.444 -2.661 -1 -4 -2.5 -4c-2 0 -4.047 1.202 -4.5 4c2.05 -1.254 2.551 1.003 1.5 3c-1.052 2.005 -2 3 -2.5 3c-.49 0 -.924 -1.165 -1.5 -3.5c-.59 -2.42 -.5 -6.5 -3 -6.5s-5.5 4.5 -5.5 4.5z"
  334. />
  335. </svg>
  336. Vimeo
  337. </a>
  338. <a href="#" class="btn btn-dribbble">
  339. <!-- SVG icon from http://tabler.io/icons/icon/brand-dribbble -->
  340. <svg
  341. xmlns="http://www.w3.org/2000/svg"
  342. class="icon"
  343. width="24"
  344. height="24"
  345. viewBox="0 0 24 24"
  346. stroke-width="2"
  347. stroke="currentColor"
  348. fill="none"
  349. stroke-linecap="round"
  350. stroke-linejoin="round"
  351. >
  352. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  353. <circle cx="12" cy="12" r="9" />
  354. <path d="M9 3.6c5 6 7 10.5 7.5 16.2" />
  355. <path d="M6.4 19c3.5 -3.5 6 -6.5 14.5 -6.4" />
  356. <path d="M3.1 10.75c5 0 9.814 -.38 15.314 -5" />
  357. </svg>
  358. Dribbble
  359. </a>
  360. <a href="#" class="btn btn-github">
  361. <!-- SVG icon from http://tabler.io/icons/icon/brand-github -->
  362. <svg
  363. xmlns="http://www.w3.org/2000/svg"
  364. class="icon"
  365. width="24"
  366. height="24"
  367. viewBox="0 0 24 24"
  368. stroke-width="2"
  369. stroke="currentColor"
  370. fill="none"
  371. stroke-linecap="round"
  372. stroke-linejoin="round"
  373. >
  374. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  375. <path
  376. d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"
  377. />
  378. </svg>
  379. Github
  380. </a>
  381. <a href="#" class="btn btn-instagram">
  382. <!-- SVG icon from http://tabler.io/icons/icon/brand-instagram -->
  383. <svg
  384. xmlns="http://www.w3.org/2000/svg"
  385. class="icon"
  386. width="24"
  387. height="24"
  388. viewBox="0 0 24 24"
  389. stroke-width="2"
  390. stroke="currentColor"
  391. fill="none"
  392. stroke-linecap="round"
  393. stroke-linejoin="round"
  394. >
  395. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  396. <rect x="4" y="4" width="16" height="16" rx="4" />
  397. <circle cx="12" cy="12" r="3" />
  398. <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" />
  399. </svg>
  400. Instagram
  401. </a>
  402. <a href="#" class="btn btn-pinterest">
  403. <!-- SVG icon from http://tabler.io/icons/icon/brand-pinterest -->
  404. <svg
  405. xmlns="http://www.w3.org/2000/svg"
  406. class="icon"
  407. width="24"
  408. height="24"
  409. viewBox="0 0 24 24"
  410. stroke-width="2"
  411. stroke="currentColor"
  412. fill="none"
  413. stroke-linecap="round"
  414. stroke-linejoin="round"
  415. >
  416. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  417. <line x1="8" y1="20" x2="12" y2="11" />
  418. <path d="M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7" />
  419. <circle cx="12" cy="12" r="9" />
  420. </svg>
  421. Pinterest
  422. </a>
  423. <a href="#" class="btn btn-vk">
  424. <!-- SVG icon from http://tabler.io/icons/icon/brand-vk -->
  425. <svg
  426. xmlns="http://www.w3.org/2000/svg"
  427. class="icon"
  428. width="24"
  429. height="24"
  430. viewBox="0 0 24 24"
  431. stroke-width="2"
  432. stroke="currentColor"
  433. fill="none"
  434. stroke-linecap="round"
  435. stroke-linejoin="round"
  436. >
  437. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  438. <path
  439. d="M14 19h-4a8 8 0 0 1 -8 -8v-5h4v5a4 4 0 0 0 4 4h0v-9h4v4.5l.03 -.004a4.531 4.531 0 0 0 3.97 -4.496h4l-.342 1.711a6.858 6.858 0 0 1 -3.658 4.789h0a5.34 5.34 0 0 1 3.566 4.111l.434 2.389h0h-4a4.531 4.531 0 0 0 -3.97 -4.496v4.5z"
  440. />
  441. </svg>
  442. VK
  443. </a>
  444. <a href="#" class="btn btn-rss">
  445. <!-- SVG icon from http://tabler.io/icons/icon/brand-rss -->
  446. <svg
  447. xmlns="http://www.w3.org/2000/svg"
  448. class="icon"
  449. width="24"
  450. height="24"
  451. viewBox="0 0 24 24"
  452. stroke-width="2"
  453. stroke="currentColor"
  454. fill="none"
  455. stroke-linecap="round"
  456. stroke-linejoin="round"
  457. >
  458. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  459. <circle cx="5" cy="19" r="1" />
  460. <path d="M4 4a16 16 0 0 1 16 16" />
  461. <path d="M4 11a9 9 0 0 1 9 9" />
  462. </svg>
  463. RSS
  464. </a>
  465. <a href="#" class="btn btn-flickr">
  466. <!-- SVG icon from http://tabler.io/icons/icon/brand-flickr -->
  467. <svg
  468. xmlns="http://www.w3.org/2000/svg"
  469. class="icon"
  470. width="24"
  471. height="24"
  472. viewBox="0 0 24 24"
  473. stroke-width="2"
  474. stroke="currentColor"
  475. fill="none"
  476. stroke-linecap="round"
  477. stroke-linejoin="round"
  478. >
  479. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  480. <circle cx="7" cy="12" r="3" />
  481. <circle cx="17" cy="12" r="3" />
  482. </svg>
  483. Flickr
  484. </a>
  485. <a href="#" class="btn btn-bitbucket">
  486. <!-- SVG icon from http://tabler.io/icons/icon/brand-bitbucket -->
  487. <svg
  488. xmlns="http://www.w3.org/2000/svg"
  489. class="icon"
  490. width="24"
  491. height="24"
  492. viewBox="0 0 24 24"
  493. stroke-width="2"
  494. stroke="currentColor"
  495. fill="none"
  496. stroke-linecap="round"
  497. stroke-linejoin="round"
  498. >
  499. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  500. <path
  501. d="M3.648 4a0.64 .64 0 0 0 -.64 .744l3.14 14.528c.07 .417 .43 .724 .852 .728h10a0.644 .644 0 0 0 .642 -.539l3.35 -14.71a0.641 .641 0 0 0 -.64 -.744l-16.704 -.007z"
  502. />
  503. <path d="M14 15h-4l-1 -6h6z" />
  504. </svg>
  505. Bitbucket
  506. </a>
  507. <a href="#" class="btn btn-tabler">
  508. <!-- SVG icon from http://tabler.io/icons/icon/brand-tabler -->
  509. <svg
  510. xmlns="http://www.w3.org/2000/svg"
  511. class="icon"
  512. width="24"
  513. height="24"
  514. viewBox="0 0 24 24"
  515. stroke-width="2"
  516. stroke="currentColor"
  517. fill="none"
  518. stroke-linecap="round"
  519. stroke-linejoin="round"
  520. >
  521. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  522. <path d="M8 9l3 3l-3 3" />
  523. <line x1="13" y1="15" x2="16" y2="15" />
  524. <rect x="4" y="4" width="16" height="16" rx="4" />
  525. </svg>
  526. Tabler
  527. </a>
  528. ```
  529. ```html
  530. <a href="#" class="btn btn-facebook">
  531. <svg>...</svg>
  532. Facebook
  533. </a>
  534. ```
  535. You can also add an icon without the name of a social networking site, if you want to display more buttons in a small space.
  536. ```html example separated scrollable height="7rem"
  537. <a href="#" class="btn btn-facebook btn-icon" aria-label="Button">
  538. <!-- SVG icon from http://tabler.io/icons/icon/brand-facebook -->
  539. <svg
  540. xmlns="http://www.w3.org/2000/svg"
  541. class="icon"
  542. width="24"
  543. height="24"
  544. viewBox="0 0 24 24"
  545. stroke-width="2"
  546. stroke="currentColor"
  547. fill="none"
  548. stroke-linecap="round"
  549. stroke-linejoin="round"
  550. >
  551. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  552. <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" />
  553. </svg>
  554. </a>
  555. <a href="#" class="btn btn-x btn-icon" aria-label="Button">
  556. <!-- SVG icon from http://tabler.io/icons/icon/brand-x -->
  557. <svg
  558. xmlns="http://www.w3.org/2000/svg"
  559. width="24"
  560. height="24"
  561. viewBox="0 0 24 24"
  562. fill="none"
  563. stroke="currentColor"
  564. stroke-width="2"
  565. stroke-linecap="round"
  566. stroke-linejoin="round"
  567. class="icon icon-tabler icons-tabler-outline icon-tabler-brand-x"
  568. >
  569. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  570. <path d="M4 4l11.733 16h4.267l-11.733 -16z" />
  571. <path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772" />
  572. </svg>
  573. </a>
  574. <a href="#" class="btn btn-google btn-icon" aria-label="Button">
  575. <!-- SVG icon from http://tabler.io/icons/icon/brand-google -->
  576. <svg
  577. xmlns="http://www.w3.org/2000/svg"
  578. class="icon"
  579. width="24"
  580. height="24"
  581. viewBox="0 0 24 24"
  582. stroke-width="2"
  583. stroke="currentColor"
  584. fill="none"
  585. stroke-linecap="round"
  586. stroke-linejoin="round"
  587. >
  588. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  589. <path d="M17.788 5.108a9 9 0 1 0 3.212 6.892h-8" />
  590. </svg>
  591. </a>
  592. <a href="#" class="btn btn-youtube btn-icon" aria-label="Button">
  593. <!-- SVG icon from http://tabler.io/icons/icon/brand-youtube -->
  594. <svg
  595. xmlns="http://www.w3.org/2000/svg"
  596. class="icon"
  597. width="24"
  598. height="24"
  599. viewBox="0 0 24 24"
  600. stroke-width="2"
  601. stroke="currentColor"
  602. fill="none"
  603. stroke-linecap="round"
  604. stroke-linejoin="round"
  605. >
  606. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  607. <rect x="3" y="5" width="18" height="14" rx="4" />
  608. <path d="M10 9l5 3l-5 3z" />
  609. </svg>
  610. </a>
  611. <a href="#" class="btn btn-vimeo btn-icon" aria-label="Button">
  612. <!-- SVG icon from http://tabler.io/icons/icon/brand-vimeo -->
  613. <svg
  614. xmlns="http://www.w3.org/2000/svg"
  615. class="icon"
  616. width="24"
  617. height="24"
  618. viewBox="0 0 24 24"
  619. stroke-width="2"
  620. stroke="currentColor"
  621. fill="none"
  622. stroke-linecap="round"
  623. stroke-linejoin="round"
  624. >
  625. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  626. <path
  627. d="M3 8.5l1 1s1.5 -1.102 2 -.5c.509 .609 1.863 7.65 2.5 9c.556 1.184 1.978 2.89 4 1.5c2 -1.5 7.5 -5.5 8.5 -11.5c.444 -2.661 -1 -4 -2.5 -4c-2 0 -4.047 1.202 -4.5 4c2.05 -1.254 2.551 1.003 1.5 3c-1.052 2.005 -2 3 -2.5 3c-.49 0 -.924 -1.165 -1.5 -3.5c-.59 -2.42 -.5 -6.5 -3 -6.5s-5.5 4.5 -5.5 4.5z"
  628. />
  629. </svg>
  630. </a>
  631. <a href="#" class="btn btn-dribbble btn-icon" aria-label="Button">
  632. <!-- SVG icon from http://tabler.io/icons/icon/brand-dribbble -->
  633. <svg
  634. xmlns="http://www.w3.org/2000/svg"
  635. class="icon"
  636. width="24"
  637. height="24"
  638. viewBox="0 0 24 24"
  639. stroke-width="2"
  640. stroke="currentColor"
  641. fill="none"
  642. stroke-linecap="round"
  643. stroke-linejoin="round"
  644. >
  645. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  646. <circle cx="12" cy="12" r="9" />
  647. <path d="M9 3.6c5 6 7 10.5 7.5 16.2" />
  648. <path d="M6.4 19c3.5 -3.5 6 -6.5 14.5 -6.4" />
  649. <path d="M3.1 10.75c5 0 9.814 -.38 15.314 -5" />
  650. </svg>
  651. </a>
  652. <a href="#" class="btn btn-github btn-icon" aria-label="Button">
  653. <!-- SVG icon from http://tabler.io/icons/icon/brand-github -->
  654. <svg
  655. xmlns="http://www.w3.org/2000/svg"
  656. class="icon"
  657. width="24"
  658. height="24"
  659. viewBox="0 0 24 24"
  660. stroke-width="2"
  661. stroke="currentColor"
  662. fill="none"
  663. stroke-linecap="round"
  664. stroke-linejoin="round"
  665. >
  666. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  667. <path
  668. d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"
  669. />
  670. </svg>
  671. </a>
  672. <a href="#" class="btn btn-instagram btn-icon" aria-label="Button">
  673. <!-- SVG icon from http://tabler.io/icons/icon/brand-instagram -->
  674. <svg
  675. xmlns="http://www.w3.org/2000/svg"
  676. class="icon"
  677. width="24"
  678. height="24"
  679. viewBox="0 0 24 24"
  680. stroke-width="2"
  681. stroke="currentColor"
  682. fill="none"
  683. stroke-linecap="round"
  684. stroke-linejoin="round"
  685. >
  686. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  687. <rect x="4" y="4" width="16" height="16" rx="4" />
  688. <circle cx="12" cy="12" r="3" />
  689. <line x1="16.5" y1="7.5" x2="16.5" y2="7.501" />
  690. </svg>
  691. </a>
  692. <a href="#" class="btn btn-pinterest btn-icon" aria-label="Button">
  693. <!-- SVG icon from http://tabler.io/icons/icon/brand-pinterest -->
  694. <svg
  695. xmlns="http://www.w3.org/2000/svg"
  696. class="icon"
  697. width="24"
  698. height="24"
  699. viewBox="0 0 24 24"
  700. stroke-width="2"
  701. stroke="currentColor"
  702. fill="none"
  703. stroke-linecap="round"
  704. stroke-linejoin="round"
  705. >
  706. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  707. <line x1="8" y1="20" x2="12" y2="11" />
  708. <path d="M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7" />
  709. <circle cx="12" cy="12" r="9" />
  710. </svg>
  711. </a>
  712. <a href="#" class="btn btn-vk btn-icon" aria-label="Button">
  713. <!-- SVG icon from http://tabler.io/icons/icon/brand-vk -->
  714. <svg
  715. xmlns="http://www.w3.org/2000/svg"
  716. class="icon"
  717. width="24"
  718. height="24"
  719. viewBox="0 0 24 24"
  720. stroke-width="2"
  721. stroke="currentColor"
  722. fill="none"
  723. stroke-linecap="round"
  724. stroke-linejoin="round"
  725. >
  726. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  727. <path
  728. d="M14 19h-4a8 8 0 0 1 -8 -8v-5h4v5a4 4 0 0 0 4 4h0v-9h4v4.5l.03 -.004a4.531 4.531 0 0 0 3.97 -4.496h4l-.342 1.711a6.858 6.858 0 0 1 -3.658 4.789h0a5.34 5.34 0 0 1 3.566 4.111l.434 2.389h0h-4a4.531 4.531 0 0 0 -3.97 -4.496v4.5z"
  729. />
  730. </svg>
  731. </a>
  732. <a href="#" class="btn btn-rss btn-icon" aria-label="Button">
  733. <!-- SVG icon from http://tabler.io/icons/icon/rss -->
  734. <svg
  735. xmlns="http://www.w3.org/2000/svg"
  736. class="icon"
  737. width="24"
  738. height="24"
  739. viewBox="0 0 24 24"
  740. stroke-width="2"
  741. stroke="currentColor"
  742. fill="none"
  743. stroke-linecap="round"
  744. stroke-linejoin="round"
  745. >
  746. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  747. <circle cx="5" cy="19" r="1" />
  748. <path d="M4 4a16 16 0 0 1 16 16" />
  749. <path d="M4 11a9 9 0 0 1 9 9" />
  750. </svg>
  751. </a>
  752. <a href="#" class="btn btn-flickr btn-icon" aria-label="Button">
  753. <!-- SVG icon from http://tabler.io/icons/icon/brand-flickr -->
  754. <svg
  755. xmlns="http://www.w3.org/2000/svg"
  756. class="icon"
  757. width="24"
  758. height="24"
  759. viewBox="0 0 24 24"
  760. stroke-width="2"
  761. stroke="currentColor"
  762. fill="none"
  763. stroke-linecap="round"
  764. stroke-linejoin="round"
  765. >
  766. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  767. <circle cx="7" cy="12" r="3" />
  768. <circle cx="17" cy="12" r="3" />
  769. </svg>
  770. </a>
  771. <a href="#" class="btn btn-bitbucket btn-icon" aria-label="Button">
  772. <!-- SVG icon from http://tabler.io/icons/icon/brand-bitbucket -->
  773. <svg
  774. xmlns="http://www.w3.org/2000/svg"
  775. class="icon"
  776. width="24"
  777. height="24"
  778. viewBox="0 0 24 24"
  779. stroke-width="2"
  780. stroke="currentColor"
  781. fill="none"
  782. stroke-linecap="round"
  783. stroke-linejoin="round"
  784. >
  785. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  786. <path
  787. d="M3.648 4a0.64 .64 0 0 0 -.64 .744l3.14 14.528c.07 .417 .43 .724 .852 .728h10a0.644 .644 0 0 0 .642 -.539l3.35 -14.71a0.641 .641 0 0 0 -.64 -.744l-16.704 -.007z"
  788. />
  789. <path d="M14 15h-4l-1 -6h6z" />
  790. </svg>
  791. </a>
  792. <a href="#" class="btn btn-tabler btn-icon" aria-label="Button">
  793. <!-- SVG icon from http://tabler.io/icons/icon/brand-tabler -->
  794. <svg
  795. xmlns="http://www.w3.org/2000/svg"
  796. class="icon"
  797. width="24"
  798. height="24"
  799. viewBox="0 0 24 24"
  800. stroke-width="2"
  801. stroke="currentColor"
  802. fill="none"
  803. stroke-linecap="round"
  804. stroke-linejoin="round"
  805. >
  806. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  807. <path d="M8 9l3 3l-3 3" />
  808. <line x1="13" y1="15" x2="16" y2="15" />
  809. <rect x="4" y="4" width="16" height="16" rx="4" />
  810. </svg>
  811. </a>
  812. ```
  813. ```html
  814. <a href="#" class="btn btn-facebook btn-icon" aria-label="Button">
  815. <svg>...</svg>
  816. </a>
  817. ```
  818. ## Icon buttons
  819. Add the `.btn-icon` class to remove unnecessary padding from your button and use an icon without any additional label. Thanks to that, you can save space and make the action easy to recognize for international users.
  820. ```html example centered separated height="7rem"
  821. <a href="#" class="btn btn-primary btn-icon" aria-label="Button">
  822. <!-- SVG icon from http://tabler.io/icons/icon/activity -->
  823. <svg
  824. xmlns="http://www.w3.org/2000/svg"
  825. class="icon"
  826. width="24"
  827. height="24"
  828. viewBox="0 0 24 24"
  829. stroke-width="2"
  830. stroke="currentColor"
  831. fill="none"
  832. stroke-linecap="round"
  833. stroke-linejoin="round"
  834. >
  835. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  836. <path d="M3 12h4l3 8l4 -16l3 8h4" />
  837. </svg>
  838. </a>
  839. <a href="#" class="btn btn-github btn-icon" aria-label="Button">
  840. <!-- SVG icon from http://tabler.io/icons/icon/brand-github -->
  841. <svg
  842. xmlns="http://www.w3.org/2000/svg"
  843. class="icon"
  844. width="24"
  845. height="24"
  846. viewBox="0 0 24 24"
  847. stroke-width="2"
  848. stroke="currentColor"
  849. fill="none"
  850. stroke-linecap="round"
  851. stroke-linejoin="round"
  852. >
  853. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  854. <path
  855. d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"
  856. />
  857. </svg>
  858. </a>
  859. <a href="#" class="btn btn-success btn-icon" aria-label="Button">
  860. <!-- SVG icon from http://tabler.io/icons/icon/bell -->
  861. <svg
  862. xmlns="http://www.w3.org/2000/svg"
  863. class="icon"
  864. width="24"
  865. height="24"
  866. viewBox="0 0 24 24"
  867. stroke-width="2"
  868. stroke="currentColor"
  869. fill="none"
  870. stroke-linecap="round"
  871. stroke-linejoin="round"
  872. >
  873. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  874. <path
  875. d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6"
  876. />
  877. <path d="M9 17v1a3 3 0 0 0 6 0v-1" />
  878. </svg>
  879. </a>
  880. <a href="#" class="btn btn-warning btn-icon" aria-label="Button">
  881. <!-- SVG icon from http://tabler.io/icons/icon/star -->
  882. <svg
  883. xmlns="http://www.w3.org/2000/svg"
  884. class="icon"
  885. width="24"
  886. height="24"
  887. viewBox="0 0 24 24"
  888. stroke-width="2"
  889. stroke="currentColor"
  890. fill="none"
  891. stroke-linecap="round"
  892. stroke-linejoin="round"
  893. >
  894. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  895. <path
  896. 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"
  897. />
  898. </svg>
  899. </a>
  900. <a href="#" class="btn btn-danger btn-icon" aria-label="Button">
  901. <!-- SVG icon from http://tabler.io/icons/icon/trash -->
  902. <svg
  903. xmlns="http://www.w3.org/2000/svg"
  904. class="icon"
  905. width="24"
  906. height="24"
  907. viewBox="0 0 24 24"
  908. stroke-width="2"
  909. stroke="currentColor"
  910. fill="none"
  911. stroke-linecap="round"
  912. stroke-linejoin="round"
  913. >
  914. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  915. <line x1="4" y1="7" x2="20" y2="7" />
  916. <line x1="10" y1="11" x2="10" y2="17" />
  917. <line x1="14" y1="11" x2="14" y2="17" />
  918. <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
  919. <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
  920. </svg>
  921. </a>
  922. <a href="#" class="btn btn-purple btn-icon" aria-label="Button">
  923. <!-- SVG icon from http://tabler.io/icons/icon/chart-bar -->
  924. <svg
  925. xmlns="http://www.w3.org/2000/svg"
  926. class="icon"
  927. width="24"
  928. height="24"
  929. viewBox="0 0 24 24"
  930. stroke-width="2"
  931. stroke="currentColor"
  932. fill="none"
  933. stroke-linecap="round"
  934. stroke-linejoin="round"
  935. >
  936. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  937. <rect x="3" y="12" width="6" height="8" rx="1" />
  938. <rect x="9" y="8" width="6" height="12" rx="1" />
  939. <rect x="15" y="4" width="6" height="16" rx="1" />
  940. <line x1="4" y1="20" x2="18" y2="20" />
  941. </svg>
  942. </a>
  943. <a href="#" class="btn btn-icon" aria-label="Button">
  944. <!-- SVG icon from http://tabler.io/icons/icon/git-merge -->
  945. <svg
  946. xmlns="http://www.w3.org/2000/svg"
  947. class="icon"
  948. width="24"
  949. height="24"
  950. viewBox="0 0 24 24"
  951. stroke-width="2"
  952. stroke="currentColor"
  953. fill="none"
  954. stroke-linecap="round"
  955. stroke-linejoin="round"
  956. >
  957. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  958. <circle cx="7" cy="18" r="2" />
  959. <circle cx="7" cy="6" r="2" />
  960. <circle cx="17" cy="12" r="2" />
  961. <line x1="7" y1="8" x2="7" y2="16" />
  962. <path d="M7 8a4 4 0 0 0 4 4h4" />
  963. </svg>
  964. </a>
  965. ```
  966. ```html
  967. <a href="#" class="btn btn-primary btn-icon" aria-label="Button">
  968. <svg>...</svg>
  969. </a>
  970. ```
  971. ## Dropdown buttons
  972. Create a dropdown button that will encourage users to click for more options. You can add a label with an icon or remove the label and add an icon on its own if you want to save space. Choose the option that will best suit your design and improve the user experience.
  973. ```html example separated height="10rem"
  974. <div class="dropdown">
  975. <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
  976. <!-- SVG icon from http://tabler.io/icons/icon/calendar -->
  977. <svg
  978. xmlns="http://www.w3.org/2000/svg"
  979. class="icon"
  980. width="24"
  981. height="24"
  982. viewBox="0 0 24 24"
  983. stroke-width="2"
  984. stroke="currentColor"
  985. fill="none"
  986. stroke-linecap="round"
  987. stroke-linejoin="round"
  988. >
  989. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  990. <rect x="4" y="5" width="16" height="16" rx="2" />
  991. <line x1="16" y1="3" x2="16" y2="7" />
  992. <line x1="8" y1="3" x2="8" y2="7" />
  993. <line x1="4" y1="11" x2="20" y2="11" />
  994. <line x1="11" y1="15" x2="12" y2="15" />
  995. <line x1="12" y1="15" x2="12" y2="18" />
  996. </svg>
  997. </button>
  998. <div class="dropdown-menu">
  999. <a class="dropdown-item" href="#">Action</a>
  1000. <a class="dropdown-item" href="#">Another action</a>
  1001. </div>
  1002. </div>
  1003. <div class="dropdown">
  1004. <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
  1005. <!-- SVG icon from http://tabler.io/icons/icon/calendar -->
  1006. <svg
  1007. xmlns="http://www.w3.org/2000/svg"
  1008. class="icon"
  1009. width="24"
  1010. height="24"
  1011. viewBox="0 0 24 24"
  1012. stroke-width="2"
  1013. stroke="currentColor"
  1014. fill="none"
  1015. stroke-linecap="round"
  1016. stroke-linejoin="round"
  1017. >
  1018. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  1019. <rect x="4" y="5" width="16" height="16" rx="2" />
  1020. <line x1="16" y1="3" x2="16" y2="7" />
  1021. <line x1="8" y1="3" x2="8" y2="7" />
  1022. <line x1="4" y1="11" x2="20" y2="11" />
  1023. <line x1="11" y1="15" x2="12" y2="15" />
  1024. <line x1="12" y1="15" x2="12" y2="18" />
  1025. </svg>
  1026. Show calendar
  1027. </button>
  1028. <div class="dropdown-menu">
  1029. <a class="dropdown-item" href="#">Action</a>
  1030. <a class="dropdown-item" href="#">Another action</a>
  1031. </div>
  1032. </div>
  1033. <div class="dropdown">
  1034. <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">Show calendar</button>
  1035. <div class="dropdown-menu">
  1036. <a class="dropdown-item" href="#">Action</a>
  1037. <a class="dropdown-item" href="#">Another action</a>
  1038. </div>
  1039. </div>
  1040. ```
  1041. ```html
  1042. <div class="dropdown">
  1043. <button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
  1044. <svg>...</svg>
  1045. </button>
  1046. <div class="dropdown-menu">
  1047. <a class="dropdown-item" href="#">Action</a>
  1048. <a class="dropdown-item" href="#">Another action</a>
  1049. </div>
  1050. </div>
  1051. ```
  1052. ## Loading buttons
  1053. Add the `.btn-loading` class to show a button's loading state, which can be useful in the case of operations that take longer to process. Thanks to that, users will be aware of the current state of their action and won't give it up before it's finished.
  1054. ```html example centered separated height="7rem"
  1055. <a href="#" class="btn btn-primary btn-loading"> Button </a>
  1056. <a href="#" class="btn btn-primary btn-loading"> Loading button with loooong content </a>
  1057. ```
  1058. ```html example centered height="7rem"
  1059. <a href="#" class="btn btn-primary">
  1060. <span class="spinner-border spinner-border-sm me-2" role="status"></span>
  1061. Button
  1062. </a>
  1063. ```
  1064. ## List of buttons
  1065. Create a list of buttons using the `.btn-list` container to display different actions a user can take. If you add additional styling, such as colors, you will be able to focus users' attention on a particular action or suggest the result.
  1066. ```html example vertical centered columns={3} height="7rem"
  1067. <div class="btn-list">
  1068. <a href="#" class="btn btn-success">Save changes</a>
  1069. <a href="#" class="btn">Save and continue</a>
  1070. <a href="#" class="btn btn-danger">Cancel</a>
  1071. </div>
  1072. ```
  1073. If the list is long, it will be wrapped and some buttons will be moved to the next line, keeping them all evenly spaced.
  1074. ```html example centered
  1075. <div class="btn-list">
  1076. <a href="#" class="btn">One</a>
  1077. <a href="#" class="btn">Two</a>
  1078. <a href="#" class="btn">Three</a>
  1079. <a href="#" class="btn">Four</a>
  1080. <a href="#" class="btn">Five</a>
  1081. <a href="#" class="btn">Six</a>
  1082. <a href="#" class="btn">Seven</a>
  1083. <a href="#" class="btn">Eight</a>
  1084. <a href="#" class="btn">Nine</a>
  1085. <a href="#" class="btn">Ten</a>
  1086. <a href="#" class="btn">Eleven</a>
  1087. <a href="#" class="btn">Twelve</a>
  1088. <a href="#" class="btn">Thirteen</a>
  1089. <a href="#" class="btn">Fourteen</a>
  1090. <a href="#" class="btn">Fifteen</a>
  1091. <a href="#" class="btn">Sixteen</a>
  1092. <a href="#" class="btn">Seventeen</a>
  1093. <a href="#" class="btn">Eighteen</a>
  1094. <a href="#" class="btn">Nineteen</a>
  1095. </div>
  1096. ```
  1097. Use the `.text-center` or the `.text-end` modifiers to change the buttons' alignment and place them where they suit best.
  1098. ```html example vertical centered columns={3} height="7rem"
  1099. <div class="btn-list justify-content-center">
  1100. <a href="#" class="btn">Save and continue</a>
  1101. <a href="#" class="btn btn-primary">Save changes</a>
  1102. </div>
  1103. ```
  1104. ```html example vertical centered columns={3} height="7rem"
  1105. <div class="btn-list justify-content-end">
  1106. <a href="#" class="btn">Save and continue</a>
  1107. <a href="#" class="btn btn-primary">Save changes</a>
  1108. </div>
  1109. ```
  1110. ```html example vertical centered columns={3} height="7rem"
  1111. <div class="btn-list">
  1112. <a href="#" class="btn btn-outline-danger me-auto">Delete</a>
  1113. <a href="#" class="btn">Save and continue</a>
  1114. <a href="#" class="btn btn-primary">Save changes</a>
  1115. </div>
  1116. ```
  1117. ## Buttons with avatars
  1118. Use buttons with avatars to simplify the process of interaction and make your design more personalized. Buttons can contain avatars and labels or only avatars, if displayed on a smaller space.
  1119. ```html example centered separated height="7rem"
  1120. <a href="#" class="btn">
  1121. <span
  1122. class="avatar"
  1123. style="
  1124. background-image: url(https://images.unsplash.com/photo-1542534759-05f6c34a9e63?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100);
  1125. "
  1126. ></span>
  1127. Avatar
  1128. </a>
  1129. <a href="#" class="btn">
  1130. <span
  1131. class="avatar"
  1132. style="
  1133. background-image: url(https://images.unsplash.com/photo-1546539782-6fc531453083?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100);
  1134. "
  1135. ></span>
  1136. Avatar
  1137. </a>
  1138. <a href="#" class="btn">
  1139. <span
  1140. class="avatar"
  1141. style="
  1142. background-image: url(https://images.unsplash.com/photo-1541585452861-0375331f10bf?q=80&fm=jpg&crop=faces&fit=crop&h=100&w=100);
  1143. "
  1144. ></span>
  1145. Avatar
  1146. </a>
  1147. ```