integrations.mdx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. AdminLTE deliberately ships a lean dependency tree. Rather than bundling every form widget or chart library, we recommend best-in-class third-party libraries you can drop in when you need them. Every library below is **MIT-licensed**, **actively maintained**, and **jQuery-free**.
  2. Each section has a CDN-based "install" snippet and the minimum JavaScript needed to wire it up. You can swap CDN URLs for npm installs if you're using a bundler.
  3. > **About the version numbers below:** every CDN URL pins a specific version (eg. `@4.6.13`) so the snippets stay reproducible. They were current as of the latest release, but third-party libraries publish new versions independently of AdminLTE. Before copying a snippet into production, check the library's homepage (linked in each section) for the latest version — and consider hosting a copy yourself rather than relying on the CDN long-term.
  4. ##### Form widgets
  5. ###### Date / time picker — Flatpickr
  6. [Flatpickr](https://flatpickr.js.org/) is a lightweight, no-dependency date and time picker.
  7. ```html
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.css" />
  9. <script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13"></script>
  10. <input type="text" class="form-control" id="datepicker" placeholder="Select a date" />
  11. <script>
  12. flatpickr("#datepicker", {
  13. altInput: true,
  14. altFormat: "F j, Y",
  15. dateFormat: "Y-m-d"
  16. })
  17. </script>
  18. ```
  19. Supports date ranges, time-only mode, multiple dates, and i18n out of the box.
  20. ###### Multi-select / tag input — Tom Select
  21. [Tom Select](https://tom-select.js.org/) is a vanilla-JS rewrite of Selectize. Great fit for searchable selects, tag inputs, and remote-data autocomplete.
  22. ```html
  23. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tom-select@2.6.1/dist/css/tom-select.bootstrap5.min.css" />
  24. <script src="https://cdn.jsdelivr.net/npm/tom-select@2.6.1/dist/js/tom-select.complete.min.js"></script>
  25. <select id="tags" class="form-control" multiple placeholder="Pick some tags">
  26. <option value="design">Design</option>
  27. <option value="dev">Development</option>
  28. <option value="qa">QA</option>
  29. </select>
  30. <script>
  31. new TomSelect("#tags", { plugins: ["remove_button"] })
  32. </script>
  33. ```
  34. Ships a `tom-select.bootstrap5.min.css` theme that matches Bootstrap form controls.
  35. ###### Range slider — noUiSlider
  36. [noUiSlider](https://refreshless.com/nouislider/) handles single, range, and multi-handle sliders with no dependencies.
  37. ```html
  38. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nouislider@15.8.1/dist/nouislider.min.css" />
  39. <script src="https://cdn.jsdelivr.net/npm/nouislider@15.8.1/dist/nouislider.min.js"></script>
  40. <div id="slider"></div>
  41. <script>
  42. noUiSlider.create(document.getElementById("slider"), {
  43. start: [20, 80],
  44. connect: true,
  45. range: { min: 0, max: 100 }
  46. })
  47. </script>
  48. ```
  49. ###### Color picker — Pickr
  50. [Pickr](https://github.com/Simonwep/pickr) is a flat, modern color picker with multiple themes.
  51. ```html
  52. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simonwep/pickr@1.9.1/dist/themes/classic.min.css" />
  53. <script src="https://cdn.jsdelivr.net/npm/@simonwep/pickr@1.9.1/dist/pickr.min.js"></script>
  54. <div id="color-picker"></div>
  55. <script>
  56. Pickr.create({
  57. el: "#color-picker",
  58. theme: "classic",
  59. default: "#0d6efd",
  60. components: { preview: true, opacity: true, hue: true, interaction: { input: true, save: true } }
  61. })
  62. </script>
  63. ```
  64. ###### Input mask — IMask
  65. [IMask](https://imask.js.org/) handles phone numbers, credit cards, dates, currency — anything with a fixed pattern.
  66. ```html
  67. <script src="https://cdn.jsdelivr.net/npm/imask@7.6.1/dist/imask.min.js"></script>
  68. <input class="form-control" id="phone" placeholder="(123) 456-7890" />
  69. <script>
  70. IMask(document.getElementById("phone"), { mask: "(000) 000-0000" })
  71. </script>
  72. ```
  73. ##### File handling
  74. ###### File uploader — Dropzone
  75. [Dropzone](https://www.dropzone.dev/) is the de-facto drag-and-drop uploader. The v6 rewrite is plain JavaScript (the older v5 had jQuery-coupled examples; v6+ does not).
  76. ```html
  77. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dropzone@6.0.0-beta.2/dist/dropzone.css" />
  78. <script src="https://cdn.jsdelivr.net/npm/dropzone@6.0.0-beta.2/dist/dropzone-min.js"></script>
  79. <form action="/upload" class="dropzone" id="uploader"></form>
  80. <script>
  81. Dropzone.autoDiscover = false
  82. new Dropzone("#uploader", { paramName: "file", maxFilesize: 5 })
  83. </script>
  84. ```
  85. ###### File uploader — FilePond
  86. [FilePond](https://pqina.nl/filepond/) is a more modern alternative with a polished UX and a plugin system for image preview, validation, EXIF, etc.
  87. ```html
  88. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/filepond@4.32.12/dist/filepond.min.css" />
  89. <script src="https://cdn.jsdelivr.net/npm/filepond@4.32.12/dist/filepond.min.js"></script>
  90. <input type="file" class="filepond" />
  91. <script>
  92. FilePond.create(document.querySelector(".filepond"), { allowMultiple: true })
  93. </script>
  94. ```
  95. ##### Rich text & markdown editors
  96. ###### Rich text — Quill
  97. [Quill](https://quilljs.com/) is the best-supported open-source WYSIWYG editor. Lightweight, modular, no dependencies.
  98. ```html
  99. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css" />
  100. <script src="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.js"></script>
  101. <div id="editor" style="height: 12rem;"></div>
  102. <script>
  103. new Quill("#editor", {
  104. theme: "snow",
  105. placeholder: "Write something fancy&hellip;"
  106. })
  107. </script>
  108. ```
  109. ###### Markdown — EasyMDE
  110. [EasyMDE](https://github.com/Ionaru/easy-markdown-editor) is the actively-maintained fork of SimpleMDE. Same look, same API, but still gets updates.
  111. ```html
  112. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde@2.21.0/dist/easymde.min.css" />
  113. <script src="https://cdn.jsdelivr.net/npm/easymde@2.21.0/dist/easymde.min.js"></script>
  114. <textarea id="markdown"></textarea>
  115. <script>
  116. new EasyMDE({ element: document.getElementById("markdown") })
  117. </script>
  118. ```
  119. ###### WYSIWYG + Markdown — Toast UI Editor
  120. [Toast UI Editor](https://ui.toast.com/tui-editor) supports both markdown and WYSIWYG modes side-by-side. Best when you want users to pick their preferred mode.
  121. ```html
  122. <link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" />
  123. <script src="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js"></script>
  124. <div id="md-editor"></div>
  125. <script>
  126. new toastui.Editor({
  127. el: document.getElementById("md-editor"),
  128. height: "20rem",
  129. initialEditType: "markdown",
  130. previewStyle: "vertical"
  131. })
  132. </script>
  133. ```
  134. ##### Charts
  135. ###### ApexCharts
  136. [ApexCharts](https://apexcharts.com/) is the chart library used in the AdminLTE dashboards. Modern look, animated, MIT.
  137. ```html
  138. <script src="https://cdn.jsdelivr.net/npm/apexcharts@5.12.0/dist/apexcharts.min.js"></script>
  139. <div id="chart"></div>
  140. <script>
  141. new ApexCharts(document.querySelector("#chart"), {
  142. chart: { type: "area", height: 300 },
  143. series: [{ name: "Visits", data: [30, 40, 35, 50, 49, 60, 70] }],
  144. xaxis: { categories: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] }
  145. }).render()
  146. </script>
  147. ```
  148. ###### Chart.js
  149. [Chart.js](https://www.chartjs.org/) is the most-asked-for traditional chart library. Canvas-based, very wide chart-type support.
  150. ```html
  151. <script src="https://cdn.jsdelivr.net/npm/chart.js@4.5.1"></script>
  152. <canvas id="bar-chart" height="120"></canvas>
  153. <script>
  154. new Chart(document.getElementById("bar-chart"), {
  155. type: "bar",
  156. data: {
  157. labels: ["Q1", "Q2", "Q3", "Q4"],
  158. datasets: [{ label: "Revenue", data: [120, 190, 170, 230] }]
  159. }
  160. })
  161. </script>
  162. ```
  163. ##### Data tables
  164. ###### Tabulator
  165. [Tabulator](https://tabulator.info/) is the jQuery-free DataTables alternative used in `tables/data.html`. Sort, filter, paginate, edit, export — all built in.
  166. ```html
  167. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tabulator-tables@6.4.0/dist/css/tabulator_bootstrap5.min.css" />
  168. <script src="https://cdn.jsdelivr.net/npm/tabulator-tables@6.4.0/dist/js/tabulator.min.js"></script>
  169. <div id="table"></div>
  170. <script>
  171. new Tabulator("#table", {
  172. data: [{ id: 1, name: "Alice", role: "Admin" }],
  173. layout: "fitColumns",
  174. pagination: true,
  175. paginationSize: 10,
  176. columns: [
  177. { title: "ID", field: "id", width: 60 },
  178. { title: "Name", field: "name", headerFilter: "input" },
  179. { title: "Role", field: "role" }
  180. ]
  181. })
  182. </script>
  183. ```
  184. ##### Calendar
  185. ###### FullCalendar
  186. [FullCalendar](https://fullcalendar.io/) is the calendar used in `pages/calendar.html`. Drag-and-drop scheduling, multiple views, recurrence, MIT.
  187. ```html
  188. <script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.20/index.global.min.js"></script>
  189. <div id="calendar"></div>
  190. <script>
  191. new FullCalendar.Calendar(document.getElementById("calendar"), {
  192. initialView: "dayGridMonth",
  193. headerToolbar: { start: "prev,next today", center: "title", end: "dayGridMonth,timeGridWeek,listWeek" },
  194. events: [{ title: "Team standup", start: "2026-06-01" }]
  195. }).render()
  196. </script>
  197. ```
  198. ##### Drag and drop
  199. ###### SortableJS
  200. [SortableJS](https://sortablejs.github.io/Sortable/) powers the kanban board demo. Reorder lists, drag between lists, touch-friendly. 31k stars.
  201. ```html
  202. <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.7/Sortable.min.js"></script>
  203. <ul id="list" class="list-group">
  204. <li class="list-group-item">Item 1</li>
  205. <li class="list-group-item">Item 2</li>
  206. <li class="list-group-item">Item 3</li>
  207. </ul>
  208. <script>
  209. new Sortable(document.getElementById("list"), { animation: 150 })
  210. </script>
  211. ```
  212. ##### Lightbox / image viewer
  213. ###### GLightbox
  214. [GLightbox](https://biati-digital.github.io/glightbox/) is a vanilla-JS lightbox for images, videos, and inline content.
  215. ```html
  216. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox@3.3.1/dist/css/glightbox.min.css" />
  217. <script src="https://cdn.jsdelivr.net/npm/glightbox@3.3.1/dist/js/glightbox.min.js"></script>
  218. <a href="image-large.jpg" class="glightbox">
  219. <img src="image-thumb.jpg" alt="Click to enlarge" />
  220. </a>
  221. <script>
  222. GLightbox()
  223. </script>
  224. ```
  225. ##### Icon libraries
  226. AdminLTE ships [Bootstrap Icons](https://icons.getbootstrap.com/) by default — they're SVG-based, ~1,900 icons, and used throughout the demo. If you need more, these all work alongside AdminLTE:
  227. | Library | Icons | Notes |
  228. |---|---|---|
  229. | [Bootstrap Icons](https://icons.getbootstrap.com/) | 1,900+ | Default, SVG, MIT |
  230. | [Lucide](https://lucide.dev/) | 1,500+ | Modern, SVG, ISC, very consistent style |
  231. | [Tabler Icons](https://tabler.io/icons) | 5,800+ | MIT, broadest free set available |
  232. | [Material Symbols](https://fonts.google.com/icons) | 3,500+ | Google, Apache 2.0, variable font |
  233. | [FontAwesome Free](https://fontawesome.com/icons) | 2,000+ free | Most-recognized, font-based |
  234. | [Phosphor](https://phosphoricons.com/) | 6,000+ | MIT, six weights |
  235. Mix and match — they all coexist.
  236. ##### A note on bundling
  237. The examples above use jsDelivr CDNs for copy-paste convenience. For production use, prefer:
  238. 1. **npm install + bundler** (Vite, Webpack, Rollup) — best for tree-shaking and version locking
  239. 2. **Self-host** the minified bundles — avoids CDN downtime as a failure mode
  240. 3. **CDN with `integrity` hashes** — fine for prototypes and demos
  241. AdminLTE doesn't ship any of these libraries — keeping the framework's footprint small is intentional. Pick what you need, skip what you don't.