View Source API Reference phoenix_storybook v0.6.4

Modules

PhoenixStorybook provides a storybook-like UI interface for your Phoenix components.

Behaviour implemented by your backend module.

This module is meant to be used from generated welcome.story.exs page. It renders HTML markup from markdown guides located in the guides/folder.

An index is an optional file you can create in every folder of your storybook content tree to improve rendering of the storybook sidebar.

Responsible for rendering your components code snippet, for a given PhoenixStorybook.Variation.

Responsible for rendering your function & live components.

A struct holding all data needed by ComponentRenderer and CodeRenderer to render story variations.

Provides LiveView routing for storybook.

An attr is one of your component attributes. Its structure mimics the LiveView 0.18.0 declarative assigns.

Functions to fetch component documentation and render it at HTML.

A slot is one of your component slots. Its structure mimics the LiveView 0.18.0 declarative assigns.

A variation captures the rendered state of a UI component. Developers write multiple variations per component that describe all the “interesting” states a component can support.

A variation group is a set of similar variations that will be rendered together in a single preview <pre> block.

A story designates any kind of content in your storybook. For now only following kinds of stories are supported :component, :live_component, and :page.

Mix Tasks

Make sure your storybook local dependency has all its assets packaged in priv.

Generates a Storybook and provides setup instructions.