# noTailwindRestrictedClasses

Rule `biome/noTailwindRestrictedClasses`. Disallow Tailwind CSS classes and variants that your project doesn't allow.

- 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: #1944 by reach

## Linters

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

## Code examples

### Incorrect: the rule reports this

```jsx
<div className="text-green-500" />;
```

```jsx
<div className="md:float-left" />;
```

### Correct: the rule accepts this

```jsx
<div className="text-success flex" />;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Related rules

- [biome/noTailwindRawColors](https://lintradar.dev/rules/biome/noTailwindRawColors.md): Disallow Tailwind CSS utility classes that use raw palette colors.
- [biome/noTailwindRestyledComponents](https://lintradar.dev/rules/biome/noTailwindRestyledComponents.md): Disallow Tailwind utilities that override the appearance of components.
- [biome/noTailwindArbitraryValue](https://lintradar.dev/rules/biome/noTailwindArbitraryValue.md): Disallow arbitrary values in Tailwind CSS utility classes.
- [biome/noUndeclaredClasses](https://lintradar.dev/rules/biome/noUndeclaredClasses.md): Reports CSS class names in JSX `className` or `class` attributes that are not defined in any imported CSS file.
- [biome/noSvelteLegacyConst](https://lintradar.dev/rules/biome/noSvelteLegacyConst.md): Disallow legacy Svelte `{@const}` tags.
- [biome/noUndeclaredCustomProperties](https://lintradar.dev/rules/biome/noUndeclaredCustomProperties.md): Reports custom properties used with `var()` that have no visible declaration.

---

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