This is a sample project (a web music player) for the Open Campus Frontend Developer Programm. It uses vite, react and tailwindcss.
The state after the course session can be found in the after-course
Branch.
The state after the setup can be found in the after-setup
Branch.
These steps explain how to setup an empty project with vite, react and tailwindcss. These steps were also used to create this sample project.
yarn create @vitejs/app music-player --template react
cd music-player
yarn
yarn dev
localhost:3000
in your browser.-D
):yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest
npx tailwindcss init -p
tailwind.config.js
and postcss.config.js
tailwind.config.js
to setup purging and just-in-time mode //...
purge: ["./index.html", "./src/**/*.{js,jsx}"],
mode: "jit",
//...
index.css
and include Tailwind in index.css
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
App.css
and logo.svg
and adjust App.js
Change the App.js to his
import React from "react";
function App() {
return (
<div className="text-7xl font-black animate-bounce mt-8">
Let's get started 🎉
</div>
);
}
export default App;
(optional) Add the Tailwind CSS IntelliSense Extension if you're using vscode.
You are ready to go 🎉. Check your browser.