I've always wanted to build my own CMS. I know, there are many great solutions out there, but I've always seen little bits here and there that weren't quite the way I would like them to be.
In order to do that, I needed... an admin UI kit. And again, there are many solutions out there, but they all feel so bloated with many features. So yeah, sure, you can have a Bootstrap 5 admin panel, but filled with jQuery plugins everywhere. Or complicated building tools. Or linked to a single framework (react, vue, etc.). Or premium only features. I wanted something that didn't get in my way, that stayed simple and easy to understand and maintain.
Vanilla JS, no jQuery
If Bootstrap 5 did something right, it's giving up jQuery. There are no good reasons to use jQuery these days. If anything, you can use cash. In order to build the custom features I needed for this admin panel, I've used plain es6 modules. You can load them as is in any modern browser, or use the compiled version with esbuild.
A few unique scripts you can find:
- Responsive, deep linkable tabs
- Responsive tables
- Toasts that don't rely on html being present in the page
- Beautiful modals inspired by SweetAlert, but using Bootstrap modals under the hood
In order to test these scripts, I've used both regular Bootstrap 5 JS and Bootstrap Native, which provide a much lighter build.
Beautiful icons
There are a few things that cannot be avoided when building an admin panel. Icons, for example. Most admin panel rely on a given icon set. But this is quickly getting problematic as soon as you miss one icon in the set. Do you add another one? Change it, with often incompatible syntaxes? I mean, Feather is nice, but it's kind of limited.
This is why I'm using Last Icon, my solution to solve once and for all the icon library issue.
Forms
Forms is another sensitive topic. A lot of admin kits tend to cram everything into a single minified file. For my part, I find this approach limited: I prefer to load only the relevant librairies needed for that specific form. Is there a date picker? Load flatpickr. A masked input? Inputmask. Etc.
But maybe you are only use a handful of custom field types and want to initialize everything on first load. That is also possible. In fact, you can choose because the forms are loosely configured. You can include or exclude them in your base build very easily.
Ajax, or not
I wanted to build a lightweight admin panel because it should initialize fast even when not using ajax navigation. Ajax navigation is very nice to give a SPA feel, but it comes with its own set of issues (state management, etc.).
Again, I'm not here to make choices for you and both approaches work very well: load everything each time (it's very lightweight) or use ajax (basic unpoly support is provided to give you an idea of how it works).