---
title: "multiple-style-forwards"
description: "Reports a style() call with more than one style.forward() argument."
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.

# multiple-style-forwards

This rule reports a `style()` call that has more than one
[`style.forward()`](https://stillwind.dev/docs/macros/style#forward-props-to-a-components-element)
argument. The call is valid, but the forwarded values combine in two different
ways:

- Inline styles and custom properties apply in argument order. A later value
  replaces an earlier value with the same name.
- Classes are joined in the class attribute. As with several base styles, the
  CSS order of the files that generated them decides which class wins. The
  argument order does not decide it.

## Reported

```tsx
import { style } from "stillwind/react";

export const Panel = ({ outer, inner }: PanelProps) => (
  <div {...style("p-4", style.forward(outer), style.forward(inner))} />
);
```

> multiple-style-forwards: this call has more than one style.forward() argument; CSS order, not argument order, decides which forwarded class wins
> 
> Example:4:47

## Fixed

```tsx
import { style } from "stillwind/react";

export const Panel = ({ outer, inner }: PanelProps) => (
  <div {...style("p-4", style.forward(outer))}>
    <div {...style(style.forward(inner))} />
  </div>
);
```

## How to fix

- Forward each set of props to its own element.
- When one element must receive both sets, make sure that their classes do not
  set the same properties, and suppress the finding.

## Rule settings

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

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

Source: https://stillwind.dev/docs/lints/multiple-style-forwards/index.mdx
