# useTailwindStaticClassStrings

Rule `biome/useTailwindStaticClassStrings`. Require complete, statically written class names.

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/useTailwindStaticClassStrings` | no | no | group nursery, since 2.6.0 | [docs](https://biomejs.dev/linter/rules/use-tailwind-static-class-strings/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div className={`bg-${color}`} />;
```

```jsx
<div className={"text-" + color} />;
```

```js
clsx(`bg-${color}`);
```

### Correct: the rule accepts this

```jsx
<div className={active ? "bg-red-500" : "bg-blue-500"} />;
<div className="p-4 text-white" />;
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Related rules

- [biome/useTailwindShorthandClasses](https://lintradar.dev/rules/biome/useTailwindShorthandClasses.md): Enforce using fewer Tailwind utilities instead of multiple utilities that are functionally the same.
- [biome/useUniqueElementIds](https://lintradar.dev/rules/biome/useUniqueElementIds.md): Disallow static `id` values on elements outside SVG contexts.
- [biome/useSvelteStoreInitialValue](https://lintradar.dev/rules/biome/useSvelteStoreInitialValue.md): Require Svelte stores to be created with an initial value.
- [biome/useVueVapor](https://lintradar.dev/rules/biome/useVueVapor.md): Enforce opting in to Vue Vapor mode in `<script setup>` blocks.
- [biome/useSolidForComponent](https://lintradar.dev/rules/biome/useSolidForComponent.md): Enforce using Solid's `<For />` component for mapping an array to JSX elements.
- [biome/useReactNamingConvention](https://lintradar.dev/rules/biome/useReactNamingConvention.md): Enforces naming conventions for React `createContext`, `useId`, and `useRef`.

---

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