Skip to content

Plugin utilities and improved suggestions

Pre-release
Pre-release
Compare
Choose a tag to compare
@ben-rogerson ben-rogerson released this 01 Mar 11:45
· 1020 commits to master since this release

Plugin utility support

Twin now supports addUtilities in your config plugin section.

// In tailwind.config.js
module.exports = {
  theme: {
    extend: {},
  },
  plugins: [
    ({ addUtilities, theme }) => {
      const newUtilities = {
        ".type-sm": {
          fontSize: theme("fontSize.sm"),
          fontWeight: theme("fontWeight.medium"),
          lineHeight: theme("lineHeight.tight")
        }
      };
      addUtilities(newUtilities);
    }
  ]
};

Further plugin support is planned for the future.

Read more about adding your own custom plugin utilities

Improved suggestions

Suggestions have been upgraded and now look at more of your config. This feature will help fix mistakes and improve class discoverability.

✕ bloc was not found

Did you mean block?
✕ flex-0 was not found

Try one of these classes:
flex-grow-0 [0] / flex-grow [1] / flex-shrink-0 [0] / flex-shrink [1] / flex-1 [1 1 0%] / flex-auto [1 1 auto]
flex-initial [0 1 auto] / flex-none [none] / flex / flex-row / flex-row-reverse
flex-col / flex-col-reverse / flex-no-wrap / flex-wrap / flex-wrap-reverse

More soon, cheers