Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@-ui/spacing

dash-ui6MITdeprecated1.1.0TypeScript support: included

This package has moved to @dash-ui/spacing

Create spacing scales for design systems with dash-ui

spacing scale, dash ui, dash ui spacing scale, dash ui design system, -ui, -ui spacing scale, -ui design system

readme


@-ui/spacing

Bundlephobia Types Code coverage Build status NPM Version MIT License

npm i @-ui/spacing

Create spacing scales for design systems with dash-ui

Quick Start

import styles from '@-ui/styles'
import * as spacing from '@-ui/spacing'

const variables = {
  gap: {
    sm: '0.5rem',
    md: '1rem',
    lg: '2rem',
  },
  pad: {
    sm: '0.5rem',
    md: '1rem',
    lg: '2rem',
  },
}
// Creates CSS variables for the scales (optional)
styles.variables(variables)
// Creates the scales
export const gap = spacing.gap(style, variables.gap)
export const pad = spacing.pad(style, variables.pad)
pad('sm')

API

LICENSE

MIT