Skip to content

sensiolabs/StorybookBundle

Repository files navigation

Storybook For Symfony

Latest Version Total Downloads Monthly Downloads Software License CI

This bundle provides a basic integration for Storybook into a Symfony application using Twig Components.

DISCLAIMER:
This bundle is under active development. Some features may not work as expected and the current documentation may be incomplete.

Table of Content

  1. Installation
  2. Getting Started
  3. Configuration
    1. Twig Rendering
    2. Symfony UX Packages
    3. Configuration Reference
  4. Storybook Features
    1. Stories
      1. Writing Stories
      2. Docs
      3. Play Function
    2. Addons
      1. Actions
      2. Interactions
  5. Args Processors
  6. Component Mock
  7. Static Build

Installation

To install the bundle into your project run:

composer require sensiolabs/storybook-bundle

Initialize Storybook in your project:

bin/console storybook:init

This will create basic configuration files and add required dependencies to your package.json.

Install new dependencies with:

npm install

Ensure your Symfony server is running on the same address defined in your main.ts configuration file. Then run the Storybook dev server with:

npm run storybook

License

MIT License (MIT): see LICENSE.

References