Theme Spacing Scale (base/space.ts)

NativeBase · src/theme/base/space.ts · typescript · MIT
ui, fw:react-native, tag:spacing, tag:design

Provides a token map of spacing values for margins, paddings, and layout across NativeBase components. Use to customize or reference consistent spacing in the design system.

// Source: https://github.com/GeekyAnts/NativeBase | License: MIT | Copyright 2021 GeekyAnts India Pvt Ltd
// Provided via justclaw.it.com; keep this notice with the code.
export const spacing = {
  'px': '1px',
  '0': 0,
  '0.5': 2,
  '1': 4,
  '1.5': 6,
  '2': 8,
  '2.5': 10,
  '3': 12,
  '3.5': 14,
  '4': 16,
  '5': 20,
  '6': 24,
  '7': 28,
  '8': 32,
  '9': 36,
  '10': 40,
  '12': 48,
  '16': 64,
  '20': 80,
  '24': 96,
  '32': 128,
  '40': 160,
  '48': 192,
  '56': 224,
  '64': 256,
  '72': 288,
  '80': 320,
  '96': 384,
  '1/2': '50%',
  '1/3': '33.333%',
  '2/3': '66.666%',
  '1/4': '25%',
  '2/4': '50%',
  '3/4': '75%',
  '1/5': '20%',
  '2/5': '40%',
  '3/5': '60%',
  '4/5': '80%',
  '1/6': '16.666%',
  '2/6': '33.333%',
  '3/6': '50%',
  '4/6': '66.666%',
  '5/6': '83.333%',
  '

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key