New
You're viewing older docs for version 6.5. View latest docs

ColorPalette

Storybook's ColorPalette Doc block allows you to document all color-related items (e.g., swatches) used throughout your project.

Storybook color palette doc block

Working with MDX

Similar to Typeset, the ColorPalette Doc Block is also typically used with MDX. It supports additional customization via options. Below are some examples and a table with all the available options.

OptionDescription
titleSets the name of the color to be displayed.
<ColorItem title='tomato' />
subtitleProvides an additional description to the color.
<ColorItem subtitle='This is a bright red color' />
colorsProvides the list of colors to be displayed.
<ColorItem colors={{ White: '#FFFFFF', Concrete: '#F3F3F3' } />

Was this page helpful?

Markdown accepted ([link text](url), _italic_, **bold**, etc). Your anonymous feedback will be posted publicly on GitHub.

✍️ Edit on GitHub – PRs welcome!
Storybook
Join the community
6,565 developers and counting
WhyWhy StorybookComponent-driven UI
DocsGuidesTutorialsChangelogTelemetryStatus
CommunityAddonsGet involvedBlog
ShowcaseExploreProjectsComponent glossary
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI