If you document design systems, I'm about to save you aĀ tonĀ of time because Storybook comes with lesser-known components for organizing colors, typography, and icons.
ColorPalette
Display color systems with theĀ ColorPaletteĀ component.
ImportĀ "@storybook/blocks". Then render aĀ ColorPaletteĀ with a singleĀ ColorItem inside.
// system/colors.mdx
import { ColorPalette, ColorItem } from "@storybook/blocks"
<ColorPalette>
  <ColorItem />
</ColorPalette>
Create an object with a key and color value. And pass it to theĀ ColorItem component via theĀ colorĀ prop.
Both key and value are displayed in the UI.
<ColorItem colors={{ Apple: "#66bf3c" }} />
DescribeĀ ColorItemsĀ withĀ titleĀ andĀ subtitleĀ props.
<ColorItem
+  title="Apple"
+  subtitle="A delicious brand color."
  colors={{ Apple: "#66bf3c" }}
/>
Add as many colors to theĀ colorsĀ prop as needed.
<ColorItem
  title="Apple"
  subtitle="A delicious brand color."
  colors={{
    Apple: "#66bf3c",
+    AppleDark: "#46991f",
+    AppleLight: "#83da5a"
  }}
/>
Use any CSS-supported color value.
ColorItemĀ adds gray cross-hatches to indicate translucency āĀ where color functions with non-1Ā alpha values are used.
<ColorItem
  title="Apple"
  subtitle="A delicious brand color."
  colors={{
+    Apple: "rgba(102,191,60,1)",
+    Apple60: "rgba(102,191,60,.6)",
+    Apple30: "rgba(102,191,60,.3)",
  }}
/>
See fullĀ ColorPaletteĀ API reference.
Typeset
Display typography systems with the Typeset component.
Import the Typeset component from @storybook/blocks.
// system/typography.mdx
import { Typeset } from "@storybook/blocks";
<Typeset {/* required props */} />
TypesetĀ requires four props to render:Ā fontSizes,Ā fontWeight,Ā sampleText, andĀ fontFamily.
fontSizesĀ andĀ fontWeightĀ support any supported CSS value (and numbers).
<Typeset
+  fontSizes={["2.875em", "2em", "1.375em", "1em"]}
+  fontWeight="900"
+  sampleText="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
+  fontFamily='"Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'
/>
Create a new Typeset block for every discrete typographical subset.
<Typeset
+  fontSizes={["2.875em", "2em", "1.375em", "1em"]}
+  fontWeight="900"
+  sampleText="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
+  fontFamily='"Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'
/>
See fullĀ TypesetĀ API reference.
IconGallery
Display icons with theĀ IconGalleryĀ component.
ImportĀ "@storybook/blocks". Then render aĀ IconGalleryĀ with a singleĀ IconIteminside it.
// system/icons.mdx
import { IconGallery, IconItem } from "@storybook/blocks"
<IconGallery>
  <IconItem></IconItem>
</IconGallery>
Place an icon insideĀ IconItem. Then display that icon's name with theĀ nameĀ prop.
+ import * as Icons from "@storybook/icons";
<IconGallery>
  <IconItem name="Accessibility">
+    <Icons.Accessibility />
  </IconItem>
</IconGallery>
Take this further ā in React ā by dynamically generating all available icons.
## Storybook icons
<IconGallery>
  {Object.entries(Icons)
    .filter(([name]) => name !== "iconList")
    .map(([name, Icon]) => (
      <IconItem name={name}>
        <Icon />
      </IconItem>
    ))}
</IconGallery>
See fullĀ IconGalleryĀ API reference.
Learn moreā¦
Find in-depth references for each component on theĀ 
Also published here.
