Before creating live components, you'll want to decide how to integrate DSM with Storybook. Currently, there are two options for integrating Storybook with DSM:
- Self-hosted via an embedded URL (recommended)
- DSM-hosted via a CLI-based integration. Note that the latest version of Storybook supported in this option is 6.3.
For more details, check out this comparison table.
Self-hosted via an embedded URL
If you already have a hosted version of Storybook, you can integrate with DSM by embedding your Storybook URL. This is the quickest and simplest way to get started.
Learn how to embed Storybook in DSM via URL
DSM-hosted via a CLI-based integration
If you prefer to host your version of Storybook with DSM, you can do so via our CLI-based integration. To do so, you'll need the following:
- A code component library. DSM currently supports live components implemented in React, Vue, Angular, and HTML. Soon support will be added for even more popular frameworks. Need help thinking through your design system implementation? Check out our expert advice page.
- Familiarity with Storybook. Storybook is a development environment for UI components. DSM integrates with Storybook to bring interactive components directly into your DSM library. If you’re not familiar with Storybook, here’s a great tutorial to get you started.
- Familiarity with a development environment and NPM. You can always add people for the task to your DSM organization.
- Admin or editor access in the DSM organization. To learn more, check out the DSM roles and permissions.
Adding live components via the CLI-based DSM Storybook integration consists of 4 steps:
- Configuring the CLI-based integration (a one-time setup)
- Adding a component container in DSM
- Connecting the Storybook story to its DSM component container
- Publishing Storybook to DSM
Keep reading for detailed instructions on each step.