Skip to content

Installation and setup

Install the plugin from JSR. Use one of the below, depending on your runtime and package manager:

sh
bunx jsr add -D @olets/tailwindcss-fluid-font-size
sh
deno add @olets/tailwindcss-fluid-font-size
sh
npx jsr add -D @olets/tailwindcss-fluid-font-size
sh
pnpm dlx jsr add -D @olets/tailwindcss-fluid-font-size
sh
yarn dlx jsr add -D @olets/tailwindcss-fluid-font-size

Then add the plugin to your Tailwind configuration file.

TIP

This example uses import and JS, but you can also use require and/or TS. See the official Tailwind configuration docs.

js
import fluidFontSizePlugin from "@olets/tailwindcss-fluid-font-size";
// or
import { fluidFontSize } from "@olets/tailwindcss-fluid-font-size";

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    fluidFontSizePlugin,
    // ...
  ],
}