icons.mdx 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. ---
  2. title: Icons
  3. summary: Use any of over 5000 icons created specifically for Tabler and make your dashboard look even more attractive. All icons are under MIT license, so you can use them without any problem both in private and commercial projects.
  4. banner: icons
  5. description: Enhance dashboards with custom icons.
  6. ---
  7. If you need to add icons to your website, you can use the Tabler Icons library. It contains over 5000 icons that you can use in your projects. All icons are under the MIT license, so you can use them without any problem both in private and commercial projects. You can find the Tabler Icons library [here](https://tabler-icons.io/).
  8. ## Base icon
  9. To add an icon to your code copy the SVG code from the Tabler Icons website and paste it into your HTML file.
  10. ```html
  11. <svg
  12. xmlns="http://www.w3.org/2000/svg"
  13. class="icon icon-tabler icon-tabler-heart"
  14. width="24"
  15. height="24"
  16. viewBox="0 0 24 24"
  17. stroke-width="2"
  18. stroke="currentColor"
  19. fill="none"
  20. stroke-linecap="round"
  21. stroke-linejoin="round"
  22. >
  23. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  24. <path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"></path>
  25. </svg>
  26. ```
  27. Results can be seen in the example below.
  28. ```html example centered separated
  29. <svg
  30. xmlns="http://www.w3.org/2000/svg"
  31. class="icon icon-tabler icon-tabler-heart"
  32. width="24"
  33. height="24"
  34. viewBox="0 0 24 24"
  35. stroke-width="2"
  36. stroke="currentColor"
  37. fill="none"
  38. stroke-linecap="round"
  39. stroke-linejoin="round"
  40. >
  41. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  42. <path d="M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"></path>
  43. </svg>
  44. <svg
  45. xmlns="http://www.w3.org/2000/svg"
  46. class="icon icon-tabler icon-tabler-ghost-2"
  47. width="24"
  48. height="24"
  49. viewBox="0 0 24 24"
  50. stroke-width="2"
  51. stroke="currentColor"
  52. fill="none"
  53. stroke-linecap="round"
  54. stroke-linejoin="round"
  55. >
  56. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  57. <path d="M10 9h.01"></path>
  58. <path d="M14 9h.01"></path>
  59. <path
  60. d="M12 3a7 7 0 0 1 7 7v1l1 0a2 2 0 1 1 0 4l-1 0v3l2 3h-10a6 6 0 0 1 -6 -5.775l0 -.226l-1 0a2 2 0 0 1 0 -4l1 0v-1a7 7 0 0 1 7 -7z"
  61. ></path>
  62. <path d="M11 14h2a1 1 0 0 0 -2 0z"></path>
  63. </svg>
  64. <svg
  65. xmlns="http://www.w3.org/2000/svg"
  66. class="icon icon-tabler icon-tabler-lego"
  67. width="24"
  68. height="24"
  69. viewBox="0 0 24 24"
  70. stroke-width="2"
  71. stroke="currentColor"
  72. fill="none"
  73. stroke-linecap="round"
  74. stroke-linejoin="round"
  75. >
  76. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  77. <path d="M9.5 11l.01 0"></path>
  78. <path d="M14.5 11l.01 0"></path>
  79. <path d="M9.5 15a3.5 3.5 0 0 0 5 0"></path>
  80. <path
  81. d="M7 5h1v-2h8v2h1a3 3 0 0 1 3 3v9a3 3 0 0 1 -3 3v1h-10v-1a3 3 0 0 1 -3 -3v-9a3 3 0 0 1 3 -3"
  82. ></path>
  83. </svg>
  84. <svg
  85. xmlns="http://www.w3.org/2000/svg"
  86. class="icon icon-tabler icon-tabler-building-carousel"
  87. width="24"
  88. height="24"
  89. viewBox="0 0 24 24"
  90. stroke-width="2"
  91. stroke="currentColor"
  92. fill="none"
  93. stroke-linecap="round"
  94. stroke-linejoin="round"
  95. >
  96. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  97. <path d="M12 12m-6 0a6 6 0 1 0 12 0a6 6 0 1 0 -12 0"></path>
  98. <path d="M5 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
  99. <path d="M12 4m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
  100. <path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
  101. <path d="M5 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
  102. <path d="M19 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path>
  103. <path d="M8 22l4 -10l4 10"></path>
  104. </svg>
  105. ```
  106. ## Filled icons
  107. To use filled icons, you need to copy the SVG code from the Tabler Icons website and paste it into your HTML file.
  108. ```html
  109. <svg
  110. xmlns="http://www.w3.org/2000/svg"
  111. class="icon icon-tabler icon-tabler-heart-filled"
  112. width="24"
  113. height="24"
  114. viewBox="0 0 24 24"
  115. stroke-width="2"
  116. stroke="currentColor"
  117. fill="none"
  118. stroke-linecap="round"
  119. stroke-linejoin="round"
  120. >
  121. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  122. <path
  123. d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z"
  124. stroke-width="0"
  125. fill="currentColor"
  126. ></path>
  127. </svg>
  128. ```
  129. Look at the example below to see the filled icons.
  130. ```html example centered separated
  131. <svg
  132. xmlns="http://www.w3.org/2000/svg"
  133. class="icon icon-tabler icon-tabler-heart-filled"
  134. width="24"
  135. height="24"
  136. viewBox="0 0 24 24"
  137. stroke-width="2"
  138. stroke="currentColor"
  139. fill="none"
  140. stroke-linecap="round"
  141. stroke-linejoin="round"
  142. >
  143. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  144. <path
  145. d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z"
  146. stroke-width="0"
  147. fill="currentColor"
  148. ></path>
  149. </svg>
  150. <svg
  151. xmlns="http://www.w3.org/2000/svg"
  152. class="icon icon-tabler icon-tabler-bell-ringing-filled"
  153. width="24"
  154. height="24"
  155. viewBox="0 0 24 24"
  156. stroke-width="2"
  157. stroke="currentColor"
  158. fill="none"
  159. stroke-linecap="round"
  160. stroke-linejoin="round"
  161. >
  162. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  163. <path
  164. d="M17.451 2.344a1 1 0 0 1 1.41 -.099a12.05 12.05 0 0 1 3.048 4.064a1 1 0 1 1 -1.818 .836a10.05 10.05 0 0 0 -2.54 -3.39a1 1 0 0 1 -.1 -1.41z"
  165. stroke-width="0"
  166. fill="currentColor"
  167. ></path>
  168. <path
  169. d="M5.136 2.245a1 1 0 0 1 1.312 1.51a10.05 10.05 0 0 0 -2.54 3.39a1 1 0 1 1 -1.817 -.835a12.05 12.05 0 0 1 3.045 -4.065z"
  170. stroke-width="0"
  171. fill="currentColor"
  172. ></path>
  173. <path
  174. d="M14.235 19c.865 0 1.322 1.024 .745 1.668a3.992 3.992 0 0 1 -2.98 1.332a3.992 3.992 0 0 1 -2.98 -1.332c-.552 -.616 -.158 -1.579 .634 -1.661l.11 -.006h4.471z"
  175. stroke-width="0"
  176. fill="currentColor"
  177. ></path>
  178. <path
  179. d="M12 2c1.358 0 2.506 .903 2.875 2.141l.046 .171l.008 .043a8.013 8.013 0 0 1 4.024 6.069l.028 .287l.019 .289v2.931l.021 .136a3 3 0 0 0 1.143 1.847l.167 .117l.162 .099c.86 .487 .56 1.766 -.377 1.864l-.116 .006h-16c-1.028 0 -1.387 -1.364 -.493 -1.87a3 3 0 0 0 1.472 -2.063l.021 -.143l.001 -2.97a8 8 0 0 1 3.821 -6.454l.248 -.146l.01 -.043a3.003 3.003 0 0 1 2.562 -2.29l.182 -.017l.176 -.004z"
  180. stroke-width="0"
  181. fill="currentColor"
  182. ></path>
  183. </svg>
  184. <svg
  185. xmlns="http://www.w3.org/2000/svg"
  186. class="icon icon-tabler icon-tabler-cherry-filled"
  187. width="24"
  188. height="24"
  189. viewBox="0 0 24 24"
  190. stroke-width="2"
  191. stroke="currentColor"
  192. fill="none"
  193. stroke-linecap="round"
  194. stroke-linejoin="round"
  195. >
  196. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  197. <path
  198. d="M16.588 5.191l.058 .045l.078 .074l.072 .084l.013 .018a.998 .998 0 0 1 .182 .727l-.022 .111l-.03 .092c-.99 2.725 -.666 5.158 .679 7.706a4 4 0 1 1 -4.613 4.152l-.005 -.2l.005 -.2a4.002 4.002 0 0 1 2.5 -3.511c-.947 -2.03 -1.342 -4.065 -1.052 -6.207c-.166 .077 -.332 .15 -.499 .218l.094 -.064c-2.243 1.47 -3.552 3.004 -3.98 4.57a4.5 4.5 0 1 1 -7.064 3.906l-.004 -.212l.005 -.212a4.5 4.5 0 0 1 5.2 -4.233c.332 -1.073 .945 -2.096 1.83 -3.069c-1.794 -.096 -3.586 -.759 -5.355 -1.986l-.268 -.19l-.051 -.04l-.046 -.04l-.044 -.044l-.04 -.046l-.04 -.05l-.032 -.047l-.035 -.06l-.053 -.11l-.038 -.116l-.023 -.117l-.005 -.042l-.005 -.118l.01 -.118l.023 -.117l.038 -.115l.03 -.066l.023 -.045l.035 -.06l.032 -.046l.04 -.051l.04 -.046l.044 -.044l.046 -.04l.05 -.04c4.018 -2.922 8.16 -2.922 12.177 0z"
  199. stroke-width="0"
  200. fill="currentColor"
  201. ></path>
  202. </svg>
  203. <svg
  204. xmlns="http://www.w3.org/2000/svg"
  205. class="icon icon-tabler icon-tabler-circle-key-filled"
  206. width="24"
  207. height="24"
  208. viewBox="0 0 24 24"
  209. stroke-width="2"
  210. stroke="currentColor"
  211. fill="none"
  212. stroke-linecap="round"
  213. stroke-linejoin="round"
  214. >
  215. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  216. <path
  217. d="M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -20 0c0 -5.523 4.477 -10 10 -10zm2 5a3 3 0 0 0 -2.98 2.65l-.015 .174l-.005 .176l.005 .176c.019 .319 .087 .624 .197 .908l.09 .209l-3.5 3.5l-.082 .094a1 1 0 0 0 0 1.226l.083 .094l1.5 1.5l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l.083 -.094a1 1 0 0 0 0 -1.226l-.083 -.094l-.792 -.793l.585 -.585l.793 .792l.094 .083a1 1 0 0 0 1.403 -1.403l-.083 -.094l-.792 -.793l.792 -.792a3 3 0 1 0 1.293 -5.708zm0 2a1 1 0 1 1 0 2a1 1 0 0 1 0 -2z"
  218. stroke-width="0"
  219. fill="currentColor"
  220. ></path>
  221. </svg>
  222. ```
  223. ## Icon colors
  224. To change the color of the icon, you need to add the `text-` class to the parent element of the icon. Full list of available colors can be found [here](/docs/ui/colors). Color classes can be used with any HTML element.
  225. ```html
  226. <span class="text-red">
  227. <!-- SVG icon from http://tabler.io/icons/icon/heart -->
  228. <svg>...</svg>
  229. </span>
  230. ```
  231. Look at the example below to see how the color of the icon changes.
  232. ```html example centered separated
  233. <span class="text-red">
  234. <svg
  235. xmlns="http://www.w3.org/2000/svg"
  236. class="icon icon-tabler icon-tabler-heart-filled"
  237. width="24"
  238. height="24"
  239. viewBox="0 0 24 24"
  240. stroke-width="2"
  241. stroke="currentColor"
  242. fill="none"
  243. stroke-linecap="round"
  244. stroke-linejoin="round"
  245. >
  246. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  247. <path
  248. d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z"
  249. stroke-width="0"
  250. fill="currentColor"
  251. ></path>
  252. </svg>
  253. </span>
  254. <span class="text-yellow">
  255. <svg
  256. xmlns="http://www.w3.org/2000/svg"
  257. class="icon icon-tabler icon-tabler-star-filled"
  258. width="24"
  259. height="24"
  260. viewBox="0 0 24 24"
  261. stroke-width="2"
  262. stroke="currentColor"
  263. fill="none"
  264. stroke-linecap="round"
  265. stroke-linejoin="round"
  266. >
  267. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  268. <path
  269. d="M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z"
  270. stroke-width="0"
  271. fill="currentColor"
  272. ></path>
  273. </svg>
  274. </span>
  275. <span class="text-blue">
  276. <svg
  277. xmlns="http://www.w3.org/2000/svg"
  278. class="icon icon-tabler icon-tabler-circle"
  279. width="24"
  280. height="24"
  281. viewBox="0 0 24 24"
  282. stroke-width="2"
  283. stroke="currentColor"
  284. fill="none"
  285. stroke-linecap="round"
  286. stroke-linejoin="round"
  287. >
  288. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  289. <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
  290. </svg>
  291. </span>
  292. <span class="text-green">
  293. <svg
  294. xmlns="http://www.w3.org/2000/svg"
  295. class="icon icon-tabler icon-tabler-square-rounded"
  296. width="24"
  297. height="24"
  298. viewBox="0 0 24 24"
  299. stroke-width="2"
  300. stroke="currentColor"
  301. fill="none"
  302. stroke-linecap="round"
  303. stroke-linejoin="round"
  304. >
  305. <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
  306. <path d="M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"></path>
  307. </svg>
  308. </span>
  309. ```
  310. ## Icon animations
  311. To add an animation to the icon, you need to add the `icon-pulse`, `icon-tada`, or `icon-rotate` class to the SVG element.
  312. ```html
  313. <!-- SVG icon from http://tabler.io/icons/icon/heart -->
  314. <svg class="icon-pulse" ...>...</svg>
  315. <!-- SVG icon from http://tabler.io/icons/icon/bell -->
  316. <svg class="icon-tada" ...>...</svg>
  317. <!-- SVG icon from http://tabler.io/icons/icon/rotate-clockwise -->
  318. <svg class="icon-rotate" ...>...</svg>
  319. ```
  320. Look at the example below to see the animated icons.
  321. ```html example centered separated
  322. <svg
  323. xmlns="http://www.w3.org/2000/svg"
  324. class="icon icon-pulse"
  325. width="24"
  326. height="24"
  327. viewBox="0 0 24 24"
  328. stroke-width="2"
  329. stroke="currentColor"
  330. fill="none"
  331. stroke-linecap="round"
  332. stroke-linejoin="round"
  333. >
  334. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  335. <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" />
  336. </svg>
  337. <svg
  338. xmlns="http://www.w3.org/2000/svg"
  339. class="icon icon-tada"
  340. width="24"
  341. height="24"
  342. viewBox="0 0 24 24"
  343. stroke-width="2"
  344. stroke="currentColor"
  345. fill="none"
  346. stroke-linecap="round"
  347. stroke-linejoin="round"
  348. >
  349. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  350. <path
  351. 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"
  352. />
  353. <path d="M9 17v1a3 3 0 0 0 6 0v-1" />
  354. </svg>
  355. <svg
  356. xmlns="http://www.w3.org/2000/svg"
  357. class="icon icon-rotate"
  358. width="24"
  359. height="24"
  360. viewBox="0 0 24 24"
  361. stroke-width="2"
  362. stroke="currentColor"
  363. fill="none"
  364. stroke-linecap="round"
  365. stroke-linejoin="round"
  366. >
  367. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  368. <path d="M4.05 11a8 8 0 1 1 .5 4m-.5 5v-5h5" />
  369. </svg>
  370. ```