Appearance
Installation and setup
Installation
The plugin is available from JSR or since 3.0.0 from NPM. To install it, run one of the below, depending on your runtime and package manager:
NPM
sh
bun add -D @olets/tailwindcss-fluid-font-size
sh
deno add npm:@olets/tailwindcss-fluid-font-size
sh
npm add -D @olets/tailwindcss-fluid-font-size
sh
pnpm add -D @olets/tailwindcss-fluid-font-size
sh
yarn add -D @olets/tailwindcss-fluid-font-size
JSR
DANGER
Deprecated, may be removed from JSR in a future major version.
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
Setup
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.
Heads Up
In v1.x and v2.x, you could
js
import { fluidFontSizePlugin } from "@olets/tailwindcss-fluid-font-size";
In 3.x, you can't.
js
import fluidFontSizePlugin from "@olets/tailwindcss-fluid-font-size";
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
// ...
},
plugins: [
fluidFontSizePlugin,
// ...
],
}