1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Tauri + React + TypescriptにTailwindCSSを導入

Posted at

TailwindCSSは賛否あるが俺は使いたい!
Tauri + React + TypescriptにTailwindCSSを導入します.

ダウンロード

bun

  1. インストール
bun add -d tailwindcss postcss autoprefixer
  1. イニット
bunx tailwindcss init -p

npm

  1. インストール
npm install -D tailwindcss postcss autoprefixer
  1. イニット
npx tailwindcss init -p

ファイルを編集

tailwind.config.jsを書き換える.

tailwind.config.js
/** @type {import('tailwindcss').Config} */
export default {
  content: [
    './index.html',
    './src/**/*.{js,ts,jsx,tsx}'
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

index.cssに追加

index.css
@tailwind base;
@tailwind components;
@tailwind utilities;

さいごに

できた!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?