import { radius } from '@sky-uk/ui-core';
radius(1);
// returns '4px'

You can return the radius without a px suffix by passing false as a second argument. This is useful if you need to use the raw number for calculations.

radius(1, false);
// returns 4

Available Radiuses

  • 0 = 0
  • 1 = 4px
  • 2 = 8px
  • 3 = 12px
  • 4 = 16px
  • 'full' = A big value that should only be used when trying to make something completely rounded