Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Vanilla javascript support for tailwind plus
Dev48

© 2026 · All rights reserved.

Vanilla JavaScript support for Tailwind Plus

Источник: Tailwind CSS

Vanilla JavaScript support for Tailwind Plus

Source: Tailwind CSS

Every UI block in Tailwind Plu i now fully functional, acce ible, and interactive, even if you don't u e a framework like React or Vue.

September 25, 2026

There are a lot of UI blocks in Tailwind Plus that need JavaScript to really be useful, like dialogs, dropdowns, command palettes, and more. And unless you're a React or Vue user, using those UI blocks has always meant writing all of that tricky JavaScript yourself.

Well today that finally changes — every UI block in Tailwind Plus is now fully functional, accessible, and interactive, including the plain HTML examples.

Now you can use any dropdown, command palette, dialog, drawer, and more in any project you're working on — no JavaScript framework required.

No framework required

To pull this off, we built @tailwindplus/elements — a library we're releasing exclusively for Tailwind Plus customers.

Elements is a collection of headless custom elements that wrap up all of the complex behavior needed to build custom interactive UIs using just HTML, and can be styled any way you like using utility classes or custom CSS.

Instead of being coupled to a specific JavaScript framework, these custom elements work anywhere you can use a <script> tag:

index.html

Here's what it look like to build a custom dropdown menu with Elements:

And here's what it looks like to build a custom select:

See those custom HTML elements like <el-select> and <el-options>? Those are the secret sauce that make everything work, including automatic ARIA attribute management, focus handling, keyboard support, and more.

You can even build something as sophisticated as a custom command palette with Elements, without having to write any of your own JavaScript:

To support all of the UI blocks in Tailwind Plus, we're shipping the following primitives in this first release of Elements:

  • Autocomplete — for building things like custom Comboboxes.
  • Command palette — for building custom Command Palettes.
  • Dialog — for building custom Modal Dialogs, Drawers, and more.
  • Disclosure — for building collapsible FAQs, mobile menus in Navbars, and more.
  • Dropdown menu — for building custom Dropdowns, of course.
  • Popover — for building custom Flyout Menus and more.
  • Select — for building custom Select Menus.
  • Tabs — for building custom tabs, like we use in custom Textareas and Product Overviews.

If you're a Tailwind Plus customer, head over to the brand new Elements documentation to learn more about how everything works and check out some examples.

Leveraging the modern web

We leaned on a lot of modern platform features to keep Elements as light and native as a possible.

  • Custom elements as a cross-platform component abstraction.
  • The popover attribute to manage overlays and popovers with automatic top-layer rendering together with beforetoggle to control transitions.
  • Native <dialog> elements for focus trapping and top-layer rendering.
  • Invoker commands to declaratively manage interactive elements, like toggling a custom disclosure.
  • ElementInternals to make our custom form controls work like native form controls.

We also bundle any necessary polyfills for these features to make sure that Elements works in all of the same browsers supported by Tailwind CSS v4.0. This means Elements will only get smaller as these modern platform features become more widely available.

Components that work everywhere

Since HTML is the lowest common denominator between all web frameworks, Elements makes it possible for all of HTML-only UI blocks in Tailwind Plus to work literally anywhere.

Here's one of our Combobox examples wired up with two-way binding in Svelte:

Combobox.svelte

Or here's a custom select in Rails that's included in form submissions, just like a native form control:

app/controllers/orders_controller.rb

app/views/orders/new.html.erb

You can even use Elements in React instead of using a React-only library like Headless UI or React Aria if you want:

Try it out today

All of the updated UI blocks and the new Elements library are available now to all Tailwind Plus customers.

Check out UI block categories like Dropdowns and Command Palettes to play with these updated interactive examples yourself, and explore the new Elements documentation to learn how it all works and how to customize things for your projects.

We can't wait to see what you'll build with this stuff!

← All articles

More in Software Development

All →
A new skill finds AI agent risks, fixes them, and proves the fix worked
Microsoft

A new skill finds AI agent risks, fixes them, and proves the fix worked

Some Supabase customers are publicly exposing reams of people’s data to the webПресса
Supabase

Some Supabase customers are publicly exposing reams of people’s data to the web

Blazor Basics: SEO Basics for Blazor Web Applications
Telerik

Blazor Basics: SEO Basics for Blazor Web Applications

Affected by layoffs? Don’t miss this $75 deal for your TechCrunch Disrupt 2026 Expo+ PassПресса
Expo

Affected by layoffs? Don’t miss this $75 deal for your TechCrunch Disrupt 2026 Expo+ Pass

Last 24 hours to save up to $200 on TechCrunch Disrupt 2026. Reason 5 of 5 to attend: MomentumПресса
Momentum

Last 24 hours to save up to $200 on TechCrunch Disrupt 2026. Reason 5 of 5 to attend: Momentum

We’re building Copilot as a new OS for work that spans every model, every form factor, and every task. Today, we’re announcing our biggest update to Copilot to date, bringing four things together [Read more]
Microsoft

We’re building Copilot as a new OS for work that spans every model, every form factor, and every task. Today, we’re announcing our biggest update to Copilot to date, bringing four things together [Read more]

More from Tailwind

Tailwind Labs is joining Shopify
Tailwind

Tailwind Labs is joining Shopify

Tailwind CSS v4.3: Scrollbars, new colors, and more
Tailwind

Tailwind CSS v4.3: Scrollbars, new colors, and more

Compass: A starter kit for online courses
Tailwind

Compass: A starter kit for online courses

Tailwind CSS v4.1: Text shadows, masks, and tons more
Tailwind

Tailwind CSS v4.1: Text shadows, masks, and tons more