# @tokens-studio/types

> ![NPM version badge](https://img.shields.io/npm/v/@tokens-studio/types) ![License badge](https://img.shields.io/github/license/tokens-studio/types)

Latest version **0.5.2** (published 2025-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tokens-studio/types
pnpm add @tokens-studio/types
yarn add @tokens-studio/types
bun add @tokens-studio/types
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2025-01-07 |
| First published | 2023-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 41.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Joren Broekema |
| Maintainers | popdrazvan, jorenbroekema, six7, lukefinch, andrewattokensstudio |
| Keywords | design tokens, figma, style-dictionary, tokens studio, types |

## Links

- npm: https://www.npmjs.com/package/@tokens-studio/types
- Repository: https://github.com/tokens-studio/types
- Homepage: https://github.com/tokens-studio/types#readme
- Issues: https://github.com/tokens-studio/types/issues
- npm.io page: https://npm.io/package/@tokens-studio/types

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2025-01-07
- 0.5.1 — 2024-07-04
- 0.5.0 — 2024-07-04
- 0.4.0 — 2024-01-25
- 0.3.0 — 2023-11-16
- 0.2.5 — 2023-07-03
- 0.2.4 — 2023-06-09
- 0.2.3 — 2023-05-17
- 0.2.2 — 2023-04-24
- 0.2.1 — 2023-04-14
- 0.2.0 — 2023-04-14
- 0.1.3 — 2023-04-07
- 0.1.2 — 2023-04-07
- 0.1.1 — 2023-03-19
- 0.1.0 — 2023-03-08

## README

# Tokens Studio Types

![NPM version badge](https://img.shields.io/npm/v/@tokens-studio/types) ![License badge](https://img.shields.io/github/license/tokens-studio/types)

This repository is a collection of type definitions relating to Tokens Studio.

It currently exports types for all the available types of Design Tokens, as they exist in the Tokens Studio Figma Plugin.
It also includes some type definitions for things like the `$themes.json` schema, HSLA/RGBA values, color modifier options and composition tokens.

## Installation

With [NPM](https://www.npmjs.com/):

```sh
npm install @tokens-studio/types
```

## Documentation

See our documentation site [here](https://tokens-studio.github.io/types/)

## Usage

```ts
import { SingleTypographyToken } from '@tokens-studio/types';

function logTypographyToken(token: SingleTypographyToken) {
  // because token is properly typed, we get autocomplete
  // e.g. token.type will be typed as "typography"
  const { value } = token;
  if (typeof value === 'string') {
    console.log(value);
  } else {
    // due to proper type, we get these properties autosuggested properly
    console.log(`${value.fontWeight} ${value.fontSize}/${value.lineHeight} ${value.fontFamily}`);
  }
}
```

---
_Source: https://npm.io/package/@tokens-studio/types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
