Skip to main content
The plugin is optional. The prebuilt stylesheet already contains every token at its shipped value, and nothing in tailmotion.css requires the plugin. Add it when you want to change or extend those tokens, or use arbitrary values.

Setup

Generated utilities

70 utilities across nine groups. Each writes one custom property with !important, so an element-level utility always beats an inherited motion profile. Arbitrary values work everywhere: tm-duration-[420ms], tm-speed-[0.9], tm-distance-[3rem], tm-ease-[cubic-bezier(0.2,0,0,1)].

Default token values

Extending the tokens

Two equivalent ways. Options merge over the defaults; nothing is removed.
The merge order is: package defaults, then theme.extend.tailmotion, then plugin options. The last one wins.

TypeScript

Plugin options are typed as TailMotionPluginOptions.

Usage-generated CSS (usageGenerated, experimental)

Off by default. When true, the plugin also registers the “simple” animation and interaction catalogue (one class, one matching keyframe — fade, pop, bounce, and friends; see Installation for the full list) as real Tailwind utilities, so the v3 JIT emits only the ones your content uses instead of the whole catalogue. Their keyframes and the token/reduced-motion base layer still ship unconditionally regardless of usage — see the installation guide for why. Tailwind v3 only. Loaded through @plugin in Tailwind v4, this option ships the whole catalogue unconditionally with no pruning — v4’s compatibility layer for legacy JS plugins does not tree-shake addBase/addUtilities content by usage. Use the tailmotion/tailwind.css entry for Tailwind v4 instead. Use this instead of tailmotion/css, not alongside it — both define the same classes, so importing both ships everything twice.

What the plugin does not do

  • By default, it does not generate the animation classes. Those live in tailmotion.css, which you import separately — unless usageGenerated is on, above.
  • It does not generate variants. The prebuilt hover: / focus: / responsive selectors ship in variants.css, inside the stylesheet — Tailwind generates those itself for any utility usageGenerated registers.
  • It does not require Tailwind at runtime. tailwindcss is an optional peer dependency, and TailMotion works with no Tailwind at all.