---
title: "SW10005: Untransformed macro reference"
description: "The style function is used as a value instead of being called."
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.

# SW10005: Untransformed macro reference

This error occurs when the code uses `style` or another macro as a value, such as
by storing it in a variable or passing it to a function. The compiler replaces
macro calls at build time and removes the import, so the function does not exist
at runtime.

## Reported

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

const macro = style;
macro("p-4");
```

> SW10005: macro binding `style` has a reference that was not transformed at Span { file: FileId(2147483680), start: BytePos(56), end: BytePos(61) }

## Fixed

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

const props = macro("p-4");
```

## How to fix

- Call `style()` directly, as in the example.
- To share a style, store and pass the result of `style()`, not the function.

Source: https://stillwind.dev/docs/errors/SW10005/index.mdx
