{"id":27933130,"url":"https://github.com/paulmagadi/tailwind-install-vite-js","last_synced_at":"2026-04-18T00:07:11.771Z","repository":{"id":291742703,"uuid":"978642344","full_name":"paulmagadi/Tailwind-install-Vite-JS","owner":"paulmagadi","description":"Tailwind CSS Installation Using Vite","archived":false,"fork":false,"pushed_at":"2025-05-06T10:39:46.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T04:32:50.098Z","etag":null,"topics":["css","css-framework","tailwindcss","tailwindcss-v4","vanilla-javascript","vite","vitejs"],"latest_commit_sha":null,"homepage":"https://paulmagadi.github.io/Tailwind-install-Vite-JS/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulmagadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T09:49:10.000Z","updated_at":"2025-05-06T10:39:49.000Z","dependencies_parsed_at":"2025-05-06T10:50:45.054Z","dependency_job_id":null,"html_url":"https://github.com/paulmagadi/Tailwind-install-Vite-JS","commit_stats":null,"previous_names":["paulmagadi/tailwind-install-vite-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulmagadi/Tailwind-install-Vite-JS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmagadi%2FTailwind-install-Vite-JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmagadi%2FTailwind-install-Vite-JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmagadi%2FTailwind-install-Vite-JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmagadi%2FTailwind-install-Vite-JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulmagadi","download_url":"https://codeload.github.com/paulmagadi/Tailwind-install-Vite-JS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulmagadi%2FTailwind-install-Vite-JS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260116643,"owners_count":22961064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css-framework","tailwindcss","tailwindcss-v4","vanilla-javascript","vite","vitejs"],"created_at":"2025-05-07T04:27:31.244Z","updated_at":"2026-04-18T00:07:11.731Z","avatar_url":"https://github.com/paulmagadi.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🚀 Tailwind CSS Installation Using Vite\n\nThis guide helps you set up Tailwind CSS in a **Vite + Vanilla JavaScript** project.\n\n---\n\n## 1. Create a Vite Project\n\n```bash\nnpm create vite@latest\n```\n\n- Enter your project name (e.g. `my-tailwind-app`)\n- Select **Vanilla** and **JavaScript**\n\nThen navigate to the new project folder:\n\n```bash\ncd my-tailwind-app\n```\n\nInstall dependencies:\n\n```bash\nnpm install\n```\n\n---\n\n## 2. Install Tailwind CSS with Vite Plugin\n\n```bash\nnpm install tailwindcss @tailwindcss/vite\n```\n\n---\n\n## 3. Configure Vite to Use Tailwind CSS\n\nIn the root directory, create a `vite.config.js` file (if not auto-created):\n\n```js\n// vite.config.js\nimport { defineConfig } from 'vite'\nimport tailwindcss from '@tailwindcss/vite'\n\nexport default defineConfig({\n  plugins: [tailwindcss()],\n})\n```\n\n---\n\n## 4. Create and Configure Tailwind CSS\n\nIn your `src/` folder, create a `styles.css` file and add:\n\n```css\n/* src/styles.css */\n@import \"tailwindcss\";\n```\n\n---\n\n## 5. Add Tailwind to Your HTML\n\nIn your `index.html`, link the stylesheet and add sample content:\n\n```html\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eTailwind + Vite\u003c/title\u003e\n    \u003clink href=\"/src/styles.css\" rel=\"stylesheet\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1 class=\"text-3xl font-bold underline text-amber-500 text-center mt-10\"\u003e\n      Hello world!\n    \u003c/h1\u003e\n    \u003cscript type=\"module\" src=\"/src/main.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n---\n\n## 6. Run the Development Server\n\n```bash\nnpm run dev\n```\n\nVisit `http://localhost:5173` to see your Tailwind-styled project!\n\n\n\n# Deployment\nInstall the gh-pages package:\n\nbash\n\n`npm install --save-dev gh-pages`\n\n\n##  Update Build Script in package.json\n```\n\"scripts\": {\n  ...\n    \"deploy\": \"npm run build \u0026\u0026 gh-pages -d dist\"\n}\n```\n\n## Deploy the project:\nbash\n\n`npm run deploy`\n\nPush the codes to github, the website will be deployed to github pages using  *branch* **gh-pages**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulmagadi%2Ftailwind-install-vite-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulmagadi%2Ftailwind-install-vite-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulmagadi%2Ftailwind-install-vite-js/lists"}