Tailwind CSS and shadcn/ui designs in the WordPress block editor

A technical review of how Tailwind CSS, shadcn/ui components and Lucide icons from AI builders map to WordPress blocks and theme.json.

Convert2WP – convert your AI website to WordPress

The design stack of AI website builders

Nearly every modern AI website builder generates interfaces with the same stack: React, Tailwind CSS for utility classes, shadcn/ui components built on Radix primitives and Lucide icons. The visual result is clean and consistent, which is why so many AI-generated sites look polished from the first prompt. For a WordPress migration it is important to understand which parts of this stack are pure presentation and which parts depend on JavaScript.

Tailwind classes and CSS variables are pure presentation and transfer almost perfectly. shadcn/ui components are a mix: a card, badge or button is just styled HTML, while a dialog, dropdown or popover relies on JavaScript for focus management and accessibility. Icons are SVG and transfer as graphics.

Compiled CSS as the source of truth

Tailwind only outputs the classes that are actually used. The compiled stylesheet of the live site is therefore a compact, complete description of the design. Convert2WP keeps the class names on the converted markup and loads the stylesheet in the generated theme, which means spacing, typography, borders, shadows and responsive breakpoints behave as before.

CSS variables used by shadcn/ui, such as background, foreground, primary and muted colours, are preserved as custom properties. Dark mode based on a class on the html element can be kept with a tiny script or simplified to a single theme, depending on the requirements.

Mapping design tokens into theme.json

For a maintainable block theme, register the core tokens in theme.json: the colour palette, font families, font sizes and spacing presets. Editors then pick the brand colours from the palette instead of typing hex codes, and new blocks automatically follow the original design system. This is the bridge between a utility-first codebase and a visual editor.

Keep the palette short and semantic: primary, secondary, accent, background, foreground and muted are usually enough. Disable custom colours for editors if strict brand consistency is required.

Component by component

Buttons map to core button blocks with a custom style. Cards become group blocks with a border, radius and padding. Badges become small paragraphs or a custom block style. Tabs and accordions map to the details block or a lightweight block plugin. Dialogs and sheets are rebuilt with a modal block or a popup plugin. Navigation menus become the navigation block, including a mobile overlay.

Forms built with shadcn form components are replaced by a form plugin, because they depended on a backend that is not converted. Data tables become table blocks or a table plugin with sorting if needed. Charts become static images or a chart block when live data is required.

Icons and imagery

Lucide icons are rendered as inline SVG in the final page. After conversion they remain SVG, either inline in custom HTML or uploaded as image files. Inline SVG keeps colour inheritance via currentColor, which is useful for hover states. For image assets, convert large PNG files to WebP or AVIF and let WordPress generate responsive sizes.

Accessibility considerations

Radix primitives provide keyboard navigation and ARIA attributes automatically. When interactive components are rebuilt in WordPress, verify that menus open with the keyboard, focus is visible, modals trap focus and buttons have accessible names. Core blocks handle much of this correctly; quality plugins do as well. A short manual keyboard test of the main templates is a professional habit.

Performance of the converted theme

A compiled Tailwind file is usually small. Combined with server-rendered HTML and no large JavaScript bundle, converted pages often load faster than the original single-page application. Add page caching, image optimisation and a CDN, and Core Web Vitals scores typically improve noticeably.

Expert conclusion

Tailwind and shadcn/ui designs are among the easiest to bring to WordPress, because their visual layer is explicit and compiled. Convert2WP preserves the classes and the look; theme.json turns the tokens into editor options; core blocks and a few plugins replace the interactive parts. Small differences in animations or edge-case components are normal and are refined afterwards in the block editor or with a plugin.

Convert2WP – convert your AI website to WordPress