包详细信息

@catppuccin/tailwindcss

catppuccin4.7kMIT0.1.6
pastel-colors, catppuccin, colors, theme

自述文件

Logo
Catppuccin for TailwindCSS

Preview

You can check out one of our deployed examples here!

Usage

  1. Install the plugin
$ npm install -D @catppuccin/tailwindcss
# --- or ---
$ yarn add -D @catppuccin/tailwindcss
  1. Configure your tailwind.config.js
module.exports = {
  // ...other settings
  plugins: [require("@catppuccin/tailwindcss")],
};
  1. Optional: customize the plugin
module.exports = {
  // ...other settings
  plugins: [
    require("@catppuccin/tailwindcss")({
      // prefix to use, e.g. `text-pink` becomes `text-ctp-pink`.
      // default is `false`, which means no prefix
      prefix: "ctp",
      // which flavour of colours to use by default, in the `:root`
      defaultFlavour: "latte",
    }),
  ],
};
  1. Use it in your markup!
<!-- switching the class for parent elements changes the flavour! -->
<body class="frappe">
  <h1 class="bg-base text-pink">Hello world!</h1>
</body>

You can find examples for Next.js, Svelte, and Vite in the examples folder.

💝 Thanks to

 

Copyright © 2021-present Catppuccin Org

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.1.6 (2023-06-23)

Bug Fixes

  • don't require plugin options to be set (e5f774b)

0.1.5 (2023-06-23)

0.1.4 (2023-06-23)

Bug Fixes

  • don't override default tailwind color shades (ac73c21), closes #4

0.1.3 (2023-06-23)

Features

0.1.1 (2022-10-22)

Bug Fixes

  • don't set an opinionated default flavour (0b6ab0a), closes #3

0.1.0 (2022-07-05)

  • Now released under the @catppuccin namespace: @catppuccin/tailwindcss.
  • All examples have been updated to use the new package name.

0.0.3 (2022-06-12)

Features

  • add custom prefix support for the theme selector class name (2c12625)

0.0.2 (2022-06-12)

Bug Fixes

  • correctly handle undefined options, allowing use without explicit configuration (72c0a58)

0.0.1 (2022-06-12)

Initial release.