---
title: "invalid-utility"
description: "Reports a known utility written in a form that it does not accept."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# invalid-utility

This rule reports a utility whose name is known but whose form is not valid. For
example, `flex` has no negative form, so `-flex` is invalid. The utility produces
no CSS.

## Reported

```tsx
style("-flex");
```

> invalid-utility: `flex` does not accept a negative value
> 
> Example:1:8

## Fixed

```tsx
style("flex");
```

## How to fix

- Remove the modifier or value that the utility does not accept.
- Check the accepted forms in [Built-in utilities](/docs/utilities).

A utility name or theme value that does not exist is reported by
[unknown-utility](/docs/lints/unknown-utility) instead.

## Rule settings

| Preset | Severity |
| --- | --- |
| `recommended` | deny |
| `strict` | deny |
| `stylistic` | off |

[Configure lint](/docs/configuration#lint) to change the severity or options.

Source: https://stillwind.dev/docs/lints/invalid-utility/index.mdx
