# useTailwindShorthandClasses

Rule `biome/useTailwindShorthandClasses`. Enforce using fewer Tailwind utilities instead of multiple utilities that are functionally the same.

- Source: biome
- Technologies: Tailwind CSS, React
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1969 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/useTailwindShorthandClasses` | no | unsafe | group nursery, since 2.5.9 | [docs](https://biomejs.dev/linter/rules/use-tailwind-shorthand-classes/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div className="w-4 h-4" />;
```

### Correct: the rule accepts this

```jsx
<div className="size-4" />;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useTailwindShorthandClasses": "error"
      }
    }
  }
}
```

## Related rules

- [biome/useSvelteStoreInitialValue](https://lintradar.dev/rules/biome/useSvelteStoreInitialValue.md): Require Svelte stores to be created with an initial value.
- [biome/useTailwindStaticClassStrings](https://lintradar.dev/rules/biome/useTailwindStaticClassStrings.md): Require complete, statically written class names.
- [biome/useSolidForComponent](https://lintradar.dev/rules/biome/useSolidForComponent.md): Enforce using Solid's `<For />` component for mapping an array to JSX elements.
- [biome/useUniqueElementIds](https://lintradar.dev/rules/biome/useUniqueElementIds.md): Disallow static `id` values on elements outside SVG contexts.
- [biome/useReactNamingConvention](https://lintradar.dev/rules/biome/useReactNamingConvention.md): Enforces naming conventions for React `createContext`, `useId`, and `useRef`.
- [biome/useVueVapor](https://lintradar.dev/rules/biome/useVueVapor.md): Enforce opting in to Vue Vapor mode in `<script setup>` blocks.

---

Web page: https://lintradar.dev/rules/biome/useTailwindShorthandClasses. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
