# noTailwindArbitraryValue

Rule `biome/noTailwindArbitraryValue`. Disallow arbitrary values in Tailwind CSS utility classes.

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noTailwindArbitraryValue` | no | no | group nursery, since 2.5.7 | [docs](https://biomejs.dev/linter/rules/no-tailwind-arbitrary-value/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div className="w-[400px]" />;
```

```jsx
<div className="text-[#555] bg-white" />;
```

```jsx
<div className="[color:red]" />;
```

### Correct: the rule accepts this

```jsx
<div className="w-4 text-red-500 bg-white" />;
<div className="[&:nth-child(3)]:px-2 bg-black/[0.5]" />;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Related rules

- [biome/noSvelteLegacyConst](https://lintradar.dev/rules/biome/noSvelteLegacyConst.md): Disallow legacy Svelte `{@const}` tags.
- [biome/noTailwindRawColors](https://lintradar.dev/rules/biome/noTailwindRawColors.md): Disallow Tailwind CSS utility classes that use raw palette colors.
- [biome/noSvelteIgnoredUnsubscribe](https://lintradar.dev/rules/biome/noSvelteIgnoredUnsubscribe.md): Disallow ignoring the function returned by a store's `subscribe()` method.
- [biome/noTailwindRestrictedClasses](https://lintradar.dev/rules/biome/noTailwindRestrictedClasses.md): Disallow Tailwind CSS classes and variants that your project doesn't allow.
- [biome/noSolidDestructuredProps](https://lintradar.dev/rules/biome/noSolidDestructuredProps.md): Disallow destructuring props inside JSX components in Solid projects.
- [biome/noTailwindRestyledComponents](https://lintradar.dev/rules/biome/noTailwindRestyledComponents.md): Disallow Tailwind utilities that override the appearance of components.

---

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