Yesterday, I needed to create a modal, but I didn’t want to create a modal. I thought, “Surely, someone has done this to a level of completion that will both satisfy my need and exceed the amount of effort I am prepared to invest in this thing that should already exist.” Building blocks, etc.
Why Thickbox in WordPress is great
- It’s a modal API built into core
- It’s a simple white box with an optional title, close button, and no offensive styling
- You don’t have to build it
Perhaps Also Not Great
Thickbox’s fate as a part of WordPress core is questionable. Here’s a six year discussion of whether it should still be included, and WordPress core also bundles jQuery UI Dialog via the ‘jquery-ui-dialog’ script handle.
Even if WordPress core drops this library in a future version, a plugin could be written to maintain compatibility. Today, I prefer thickbox because its implementation is so simple.