---
title: "scale"
description: "A dimension token whose accessor leaf is a multiplier rather than a value. The token emits its own custom property; the accessor leaf is callable, and carries the base itself as `.token`."
url: "https://pitlane.tools/package/theme/schema/function/scale"
---

# scale

```ts
import { scale } from "@pitlane/theme/schema";
```

```ts
function scale(): TokenSchema<"scale">;
```

A dimension token whose accessor leaf is a multiplier rather than a value. The token emits its own custom property; the accessor leaf is callable, and carries the base itself as `.token`.

This is Tailwind's `--spacing`: one base that the whole scale multiplies, with no named steps.

## Returns

[`TokenSchema`](https://pitlane.tools/package/theme/schema/interface/TokenSchema.md)\<`"scale"`>

A schema declaring a scale token

## Example

```ts
let theme = createTheme({
    schema: { spacing: s.scale() },
    tokens: { spacing: "0.25rem" },
});

theme.token.spacing(4); // "calc(var(--spacing) * 4)"
theme.token.spacing.token; // "var(--spacing)"
```
