{"id":102241,"date":"2026-09-25T21:12:24","date_gmt":"2026-09-25T21:12:24","guid":{"rendered":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/flowbite-wordpress\/"},"modified":"2026-10-02T17:17:57","modified_gmt":"2026-10-02T17:17:57","slug":"flowbite-wordpress","status":"publish","type":"tutorials","link":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/flowbite-wordpress\/","title":{"rendered":"How to Use Flowbite Components in WordPress"},"content":{"rendered":"\n<div class=\"wp-block-group container has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--mega);padding-bottom:var(--wp--preset--spacing--mega)\"><h1 class=\"wp-block-post-title\">How to Use Flowbite Components in WordPress<\/h1>\n\n\n<p class=\"wp-block-paragraph\"><strong>Flowbite<\/strong> is a library of UI components built with Tailwind CSS: navbars, modals, dropdowns, accordions, tabs, date pickers and more. Unlike pure-CSS libraries, it ships the <strong>JavaScript<\/strong> that makes interactive components work. If you keep rebuilding the same dropdown or modal on every WordPress site, Flowbite gives you a tested version to copy and adapt. If Tailwind isn&#8217;t set up on your site yet, start with <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/tailwind-css-wordpress\/\">how to use Tailwind CSS in WordPress<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Flowbite works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Flowbite has two parts:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>A Tailwind plugin<\/strong> that adds the styles and theme variables its components use.<\/li>\n\n\n<li><strong>A JavaScript file<\/strong> that powers interactive components through <code>data-<\/code> attributes (for example <code>data-modal-toggle<\/code>, <code>data-dropdown-toggle<\/code>).<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You copy a component&#8217;s HTML from the Flowbite docs into your page, and it works once both parts are loaded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: add the Tailwind plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In Tailwind v4, load it with <code>@plugin<\/code>. The important detail: the plugin path is <strong><code>flowbite\/plugin<\/code><\/strong>, not just <code>flowbite<\/code>, because that&#8217;s where the plugin file lives.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@plugin \"flowbite\/plugin\";<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/downloads\/winden\/\">Winden<\/a>, which compiles Tailwind inside WordPress without Node.js, load it from esm.sh:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@plugin \"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/esm.sh\/flowbite\/plugin\/\";<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: define the theme variables<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Recent Flowbite versions style components with semantic color variables. Define them in your <code>@theme<\/code>, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@theme {\n  --color-body: var(--color-stone-600);\n  --color-heading: var(--color-stone-900);\n  --color-fg-brand: var(--color-stone-950);\n  --font-sans: \"Inter\", ui-sans-serif, system-ui, sans-serif;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Map them to your own brand colors, ideally the ones you defined in Winden&#8217;s Wizard, so Flowbite components match the rest of the site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: load the JavaScript<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Static components (buttons, cards, badges) work with CSS only. For accordions, dropdowns, modals and tabs you also need Flowbite&#8217;s script. Follow the &#8220;include via CDN&#8221; instructions in <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/flowbite.com\/docs\/getting-started\/quickstart\/\">Flowbite&#8217;s quickstart<\/a>, and load the script in the footer. In WordPress you can enqueue it from your theme, or add it as a footer script with a code manager such as <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/downloads\/scripts-organizer\/\">Scripts Organizer<\/a>, limited to the pages that use interactive components.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: use components<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Copy a component from Flowbite&#8217;s docs and paste it into a <strong>Custom HTML<\/strong> block in Gutenberg, or into your builder. In Bricks you can even <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/paste-html-into-bricks-builder\/\">paste the HTML as real Bricks elements<\/a>. For components you reuse a lot, turn them into your own block, so editors only change the text: see <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/create-custom-gutenberg-block-without-react\/\">how to create a custom Gutenberg block without React<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">daisyUI or Flowbite?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>daisyUI<\/strong> is CSS-only component classes (<code>btn<\/code>, <code>card<\/code>) with themes. Short markup, no JavaScript. See <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/daisyui-wordpress\/\">daisyUI in WordPress<\/a>.<\/li>\n\n\n<li><strong>Flowbite<\/strong> gives you full HTML components plus the JavaScript for interactive ones.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Many sites use daisyUI-style classes for the basics and a few Flowbite components for interactive parts.<\/p>\n\n\n\n<div class=\"wp-block-group card-hl p-base has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"margin-top:var(--wp--preset--spacing--mega)\">\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-410afcbf wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure class=\"wp-block-image size-large has-custom-border\"><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/downloads\/winden\/\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"634\" src=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-content\/uploads\/edd\/2022\/08\/Winden-1024x634.jpg\" alt=\"Flowbite and Tailwind in WordPress\" class=\"wp-image-62370\" style=\"border-radius:var(--radius-base)\" srcset=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-content\/uploads\/edd\/2022\/08\/Winden-1024x634.jpg 1024w, https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-content\/uploads\/edd\/2022\/08\/Winden-300x186.jpg 300w, https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-content\/uploads\/edd\/2022\/08\/Winden-768x476.jpg 768w, https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-content\/uploads\/edd\/2022\/08\/Winden.jpg 1440w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:60%\">\n<h3 class=\"wp-block-heading is-style-hl-title text-lg\">Flowbite and Tailwind in WordPress<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Winden compiles Tailwind v4 with plugins like Flowbite inside WordPress, for Gutenberg and every major builder.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/downloads\/winden\/\">See Winden<\/a><\/div>\n<\/div>\n\n<\/div>\n<\/div>\n\n<\/div>\n\n\n\n<!-- dp-related-section -->\n\n<h2 class=\"wp-block-heading\">Related guides<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/fluid-typography-tailwind-wordpress\/\">Fluid Typography and Spacing with Tailwind CSS in WordPress<\/a>: Sizes that scale smoothly from mobile to desktop.<\/li>\n\n\n<li><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/css-class-autocomplete-gutenberg\/\">How to Get CSS Class Autocomplete in the Gutenberg Block Editor<\/a>: Suggestions from your CSS, not memory.<\/li>\n\n\n<li><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/design-tokens-figma-variables\/\">Design Tokens in Figma with Variables: A Practical Guide<\/a>: Colors, spacing and type as Figma variables.<\/li>\n\n\n<li><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/color-palette-50-950-figma\/\">How to Generate a 50\u2013950 Color Palette in Figma<\/a>: One brand color, a full shade ramp.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Browse <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/tutorials\/\">all WordPress tutorials<\/a>.<\/p>\n\n<!-- \/dp-related-section -->\n<\/div>\n\n","protected":false},"featured_media":102242,"template":"","class_list":["post-102241","tutorials","type-tutorials","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/tutorials\/102241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/tutorials"}],"about":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/types\/tutorials"}],"version-history":[{"count":2,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/tutorials\/102241\/revisions"}],"predecessor-version":[{"id":102445,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/tutorials\/102241\/revisions\/102445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/media\/102242"}],"wp:attachment":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/wp-json\/wp\/v2\/media?parent=102241"}],"curies":[{"name":"wp","href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/api.w.org\/{rel}","templated":true}]}}