SpacingToken

A token variant with a ruler icon for documenting spacing, padding, and gap values.

Overview

SpacingToken is a specialized variant of the Token component that adds a visual icon to help distinguish spacing-related values while using the same tooltip pattern to reveal the exact measurement.

This component implements the dimension type from the W3C Design Tokens specification (§8.2), which represents distance values with units like px or rem.

Installation

npx shadcn add @tokenui/spacing-token

Usage

Use SpacingToken for spacing, padding, or gap values:

API Reference

SpacingToken

Prop

Type