BST Tauri 开发笔记(4)- Tailwind CSS / DaisyUI

安装Tailwindcss

npm install -D tailwindcss postcss autoprefixer 

生成 tailwind.conf.cjs

npx tailwindcss init -p  

安装daisyui和daisyui react

npm i daisyui react-daisyui    

taiwind.config.cjs

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [require('daisyui')],
}

设置主题 index.html

<!DOCTYPE html>
<html lang="en" data-theme="light">
...

发表回复