@-ui/spacingdeprecated

Create spacing scales for design systems with dash-ui

Usage no npm install needed!

<script type="module">
  import UiSpacing from 'https://cdn.skypack.dev/@-ui/spacing';
</script>

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