API Reference phx_live_storybook v0.4.5

modules

Modules

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.

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

Behaviour implemented by your backend module.

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 PhxLiveStorybook.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.

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

Mix Tasks

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

Generates a Storybook and provides setup instructions.