v16

Orbit Migration Guide v16

Breaking changes

Heading component & Tailwind classes

<Heading type="title1">Title 1</Heading>
<Heading type="title0">Title 0</Heading>
<p className="leading-heading-title1 text-heading-title1 font-heading-title1">Title 1</p>
<p className="leading-heading-title0 text-heading-title0 font-heading-title0">Title 0</p>

Tokens

Heading

  • fontSizeHeading<TYPE> -> heading<TYPE>FontSize
  • lineHeightHeading<TYPE> -> heading<TYPE>LineHeight
  • fontWeightHeading<TYPE> -> heading<TYPE>FontWeight

Colors (Visual Breaking Change Only — from version 16.1.0)

  • productDarker (from #005C4E to #004D41)
  • blueNormal (from #0172CB to #0070C8)
  • blueDarker (from #004680 to #003866)
  • greenNormal (from #28A138 to #0A932B)
  • greenDarker (from #235C2B to #1C4A23)
  • orangeNormal (from #DF7B00 to #CF6C00)
  • orangeNormalHover (from #C96F00 to #B86000)
  • orangeNormalActive (from #B26200 to #AD5700)
  • orangeDark (from #AD5700 to #A75400)
  • orangeDarkHover (from #A75400 to #954A00)
  • orangeDarkActive (from #954A00 to #803F00)
  • orangeDarker (from #803F00 to #663200)
  • redDarker (from #760909 to #630808)

Deprecations

Tokens and Tailwind classes

Border Radius

  • borderRadiusSmall -> borderRadius50
  • borderRadiusNormal -> borderRadius100 (value change from 3px to 4px)
  • borderRadiusLarge -> borderRadius150
  • borderRadiusCircle -> borderRadiusFull
  • borderRadius200 (new value of 8px, available from version 16.1.0)
  • borderRadius300 (new value of 12px)
  • borderRadius400 (new value of 16px)
  • rounded-small -> rounded-50
  • rounded-normal -> rounded-100 (value change from 3px to 4px)
  • rounded-large -> rounded-150
  • rounded-circle -> rounded-full
  • rounded-200 (new value of 8px, available from version 16.1.0)
  • rounded-300
  • rounded-400

Elevation

  • elevationActionBoxShadow -> elevationLevel1BoxShadow
  • elevationActionActiveBoxShadow -> elevationLevel2BoxShadow
  • elevationRaisedBoxShadow -> elevationLevel3BoxShadow
  • elevationRaisedReverseBoxShadow -> elevationLevel3ReverseBoxShadow
  • elevationOverlayBoxShadow -> elevationLevel4BoxShadow
  • shadow-action -> shadow-level1
  • shadow-action-active -> shadow-level2
  • shadow-raised -> shadow-level3
  • shadow-raised-reverse -> shadow-level3-reverse
  • shadow-overlay -> shadow-level4

Spacing

  • spaceXXXSmall -> space50 (2px)
  • spaceXXSmall -> space100 (4px)
  • (new token) -> space150 (6px)
  • spaceXSmall -> space200 (8px)
  • spaceSmall -> space300 (12px)
  • spaceMedium -> space400 (16px)
  • (new token) -> space500 (20px)
  • spaceLarge -> space600 (24px)
  • spaceXLarge -> space800 (32px)
  • spaceXXLarge -> space1000 (40px)
  • (new token) -> space1200 (48px)
  • spaceXXXLarge -> DEPRECATED (52px)
  • (new token) -> space1600 (64px)
  • p-xxxs -> p-50
  • m-xxs -> m-100
  • h-xs-> h-200
  • w-sm -> w-300
  • size-md -> size-400
  • top-lg -> top-600
  • space-x-xl -> space-x-800
  • space-y-xxl -> space-y-1000
  • left-xxxl -> left-[52px] (custom hardcoded value)

Box component

borderRadius & elevation props

<Box borderRadius="small" elevation="action"></Box>
<Box borderRadius="normal" elevation="raised"></Box>
<Box borderRadius="large" elevation="raisedReverse"></Box>
<Box borderRadius="circle" elevation="overlay"></Box>
<Box borderRadius="50" elevation="level1"></Box>
<Box borderRadius="100" elevation="level3"></Box>
<Box borderRadius="150" elevation="level3Reverse"></Box>
<Box borderRadius="full" elevation="level4"></Box>

spacing props

<Box padding="XXXSmall">"XXXSmall" padding</Box>
<Box margin="XXSmall">"XXSmall" margin</Box>
<Box padding={{ top: "XSmall", left: "small" }}>padding-top="XSmall"; padding-left="small"</Box>
<Box margin={{ bottom: "medium", right: "large" }}>margin-bottom="medium"; margin-right="large"</Box>
<Box tablet={{ padding: "XLarge", margin: "XXLarge" }}>padding="XLarge"; margin="XXLarge" (tablet and bigger)</Box>
<Box padding="50">"50" padding</Box>
<Box margin="100">"100" margin</Box>
<Box padding={{ top: "200", left: "300" }}>padding-top="200"; padding-left="300"</Box>
<Box margin={{ bottom: "400", right: "600" }}>margin-bottom="400"; margin-right="600"</Box>
<Box tablet={{ padding: "800", margin: "1000" }}>padding="800"; margin="1000" (tablet and bigger)</Box>

Stack component

<Stack spacing="XXSmall">"XXSmall" spacing</Stack>
<Stack tablet={{ spacing: "small" }}>"small" spacing (tablet and bigger)</Stack>
// ...
<Stack spacing="100">"100" spacing</Stack>
<Stack tablet={{ spacing: "300" }}>"300" spacing (tablet and bigger)</Stack>
// ...

HorizontalScroll component

<HorizontalScroll spacing="XXSmall">"XXSmall" spacing</HorizontalScroll>
// ...
<HorizontalScroll spacing="100">"100" spacing</HorizontalScroll>
// ...

LinkList component

<LinkList spacing="XXSmall">"XXSmall" spacing</LinkList>
// ...
<LinkList spacing="100">"100" spacing</LinkList>
// ...

Tabs component

<Tabs spacing="XXSmall">"XXSmall" spacing</Tabs>
// ...
<Tabs spacing="100">"100" spacing</Tabs>
// ...

Inline component

<Inline spacing="XXSmall">"XXSmall" spacing</Inline>
// ...
<Inline spacing="100">"100" spacing</Inline>
// ...

Separator component

<Separator spacing="small">"small" spacing</Separator>
// ...
<Separator spacing="300">"300" spacing</Separator>
// ...

Codemod

curl -fsSL https://raw.githubusercontent.com/kiwicom/orbit/master/packages/orbit-components/transforms/tokens-v16.mjs | node --input-type=module