├── .gitignore ├── .vscode └── extensions.json ├── LICENSE.md ├── README.md ├── index.html ├── package.json ├── public └── vite.svg ├── src ├── App.vue ├── assets │ └── vue.svg ├── components │ └── HelloWorld.vue ├── main.js ├── router │ └── index.js ├── style.css └── views │ ├── Accordion.vue │ ├── Carousel.vue │ ├── Collapse.vue │ ├── Datepicker.vue │ ├── Dial.vue │ ├── Dismiss.vue │ ├── Drawer.vue │ ├── Dropdown.vue │ ├── Events.vue │ ├── InputCounter.vue │ ├── Modal.vue │ ├── Popover.vue │ ├── Tabs.vue │ └── Tooltip.vue └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Bergside Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tailwind 4 Vue Starter 2 | 3 | [Follow this guide](https://flowbite.com/docs/getting-started/vue/) to learn how to set up Tailwind CSS v4 with Vue and Flowbite. 4 | 5 | ## Create a Vue project 6 | 7 | Follow the next steps to install Tailwind CSS (with v4) and Flowbite with Vue 3 and Vite. 8 | 9 | 1. Create a new Vite project running the following commands in your terminal: 10 | 11 | ```bash 12 | npm create vite@latest flowbite-app -- --template vue 13 | cd flowbite-app 14 | ``` 15 | 16 | ## Install Tailwind CSS 17 | 18 | This guide uses the newest version of Tailwind CSS v4 which brings many improvements. 19 | 20 | 1. Install Tailwind CSS using Vite via the terminal: 21 | 22 | ```bash 23 | npm install tailwindcss @tailwindcss/vite --save 24 | ``` 25 | 26 | 2. Add the Tailwind plugin inside your `vite.config.js` file: 27 | 28 | ```javascript 29 | import { defineConfig } from 'vite' 30 | import vue from '@vitejs/plugin-vue' 31 | import tailwindcss from '@tailwindcss/vite' 32 | 33 | // https://vite.dev/config/ 34 | export default defineConfig({ 35 | plugins: [ 36 | vue(), 37 | tailwindcss() 38 | ], 39 | }) 40 | ``` 41 | 42 | 3. Import the `tailwind` module inside your `style.css` file: 43 | 44 | ```css 45 | @import "tailwindcss"; 46 | ``` 47 | 48 | You have now installed both Tailwind CSS and Vue and can proceed with the next steps. 49 | 50 | ## Install Flowbite 51 | 52 | The UI components from Flowbite can help you save time building websites with Vue and Tailwind. Make sure that you follow the next steps to ensure that you install both the CSS and JavaScript dependencies. 53 | 54 | 1. Install Flowbite as a dependency using NPM by running the following command: 55 | 56 | ```bash 57 | npm install flowbite --save 58 | ``` 59 | 60 | 2. Import the default theme variables from Flowbite inside your main `input.css` CSS file: 61 | 62 | ```css 63 | @import "flowbite/src/themes/default"; 64 | ``` 65 | 66 | 3. Import the Flowbite plugin file in your CSS: 67 | 68 | ```css 69 | @plugin "flowbite/plugin"; 70 | ``` 71 | 72 | 4. Configure the source files of Flowbite in your CSS: 73 | 74 | ```css 75 | @source "../node_modules/flowbite"; 76 | ``` 77 | 78 | ## Flowbite Components 79 | 80 | Now that you have successfully installed Vue, Tailwind CSS and Flowbite you can start importing and using components from the open-source library of [Flowbite](https://flowbite.com) such as modals, navbars, tables, dropdowns, and more. 81 | 82 | 83 | 4. Start a local development server by running the following command in your terminal: 84 | 85 | ```bash 86 | npm run dev 87 | ``` 88 | 89 | If you want to build the project then you can run `npm run build`. 90 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |Learn more about Flowbite + Vue 3 here.
26 | 27 |
61 | Edit
62 | components/HelloWorld.vue
to test HMR
63 |
67 | Check out 68 | create-vue, the official Vue + Vite starter 71 |
72 |73 | Learn more about IDE Support for Vue in the 74 | Vue Docs Scaling up Guide. 79 |
80 |Click on the Vite and Vue logos to learn more
81 | 82 | 83 | 88 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import router from './router' 4 | import App from './App.vue' 5 | 6 | createApp(App).use(router).mount('#app') 7 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createWebHistory, createRouter } from "vue-router"; 2 | import Events from "../views/Events.vue"; 3 | import Accordion from "../views/Accordion.vue"; 4 | import Carousel from "../views/Carousel.vue"; 5 | import Collapse from "../views/Collapse.vue"; 6 | import Dial from "../views/Dial.vue"; 7 | import Dismiss from "../views/Dismiss.vue"; 8 | import Drawer from "../views/Drawer.vue"; 9 | import Dropdown from "../views/Dropdown.vue"; 10 | import Popover from "../views/Popover.vue"; 11 | import Tabs from "../views/Tabs.vue"; 12 | import Tooltip from "../views/Tooltip.vue"; 13 | import Modal from "../views/Modal.vue"; 14 | import InputCounter from "../views/InputCounter.vue"; 15 | import Datepicker from "../views/Datepicker.vue"; 16 | 17 | const routes = [ 18 | { 19 | path: "/events", 20 | name: "Events", 21 | component: Events, 22 | }, 23 | { 24 | path: "/accordion", 25 | name: "Accordion", 26 | component: Accordion, 27 | }, 28 | { 29 | path: "/carousel", 30 | name: "Carousel", 31 | component: Carousel, 32 | }, 33 | { 34 | path: "/collapse", 35 | name: "Collapse", 36 | component: Collapse, 37 | }, 38 | { 39 | path: "/dial", 40 | name: "Dial", 41 | component: Dial, 42 | }, 43 | { 44 | path: "/dismiss", 45 | name: "Dismiss", 46 | component: Dismiss, 47 | }, 48 | { 49 | path: "/drawer", 50 | name: "Drawer", 51 | component: Drawer, 52 | }, 53 | { 54 | path: "/dropdown", 55 | name: "Dropdown", 56 | component: Dropdown, 57 | }, 58 | { 59 | path: "/popover", 60 | name: "Popover", 61 | component: Popover, 62 | }, 63 | { 64 | path: "/tabs", 65 | name: "Tabs", 66 | component: Tabs, 67 | }, 68 | { 69 | path: "/tooltip", 70 | name: "Tooltip", 71 | component: Tooltip, 72 | }, 73 | { 74 | path: "/modal", 75 | name: "Modal", 76 | component: Modal, 77 | }, 78 | { 79 | path: "/input-counter", 80 | name: "InputCounter", 81 | component: InputCounter, 82 | }, 83 | { 84 | path: "/datepicker", 85 | name: "Datepicker", 86 | component: Datepicker, 87 | }, 88 | ]; 89 | 90 | const router = createRouter({ 91 | history: createWebHistory(), 92 | routes, 93 | }); 94 | 95 | export default router; -------------------------------------------------------------------------------- /src/style.css: -------------------------------------------------------------------------------- 1 | @import "tailwindcss"; 2 | 3 | @import "flowbite/src/themes/default"; 4 | @plugin "flowbite/plugin"; 5 | @source "../node_modules/flowbite"; 6 | @source "../node_modules/flowbite-datepicker"; 7 | -------------------------------------------------------------------------------- /src/views/Accordion.vue: -------------------------------------------------------------------------------- 1 | 60 | 61 | 62 |Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons, dropdowns, modals, navbars, and more.
72 |Check out this guide to learn how to get started and start developing websites even faster with components on top of Tailwind CSS.
73 |Flowbite is first conceptualized and designed using the Figma software so everything you see in the library has a design equivalent in our Figma file.
84 |Check out the Figma design system based on the utility classes from Tailwind CSS and components from Flowbite.
85 |The main difference is that the core components from Flowbite are open source under the MIT license, whereas Tailwind UI is a paid product. Another difference is that Flowbite relies on smaller and standalone components, whereas Tailwind UI offers sections of pages.
96 |However, we actually recommend using both Flowbite, Flowbite Pro, and even Tailwind UI as there is no technical reason stopping you from using the best of two worlds.
97 |Learn more about these technologies:
98 |Supercharge your hiring by taking advantage of our limited-time sale for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design job board.
33 |Supercharge your hiring by taking advantage of our limited-time sale for Flowbite Docs + Job Board. Unlimited access to over 190K top-ranked candidates and the #1 design job board.
58 |And here's some amazing content. It's very engaging. Right?
47 |This is some placeholder content the Profile tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
76 |This is some placeholder content the Dashboard tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
79 |This is some placeholder content the Settings tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
82 |This is some placeholder content the Contacts tab's associated content. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.
85 |