Overview
Blast is a low maintenance component library built to integrate into Laravel apps. It allows you to render examples of your app’s components using the blade templating engine and Storybook Server. Blast provides a range of features to help you get started with component development in Laravel.
Features
- Integration with Laravel apps
- Render examples of app components using the blade templating engine
- Use Storybook Server for component development
Installation
To install Blast, follow these steps:
- Configure your app’s assets in
config/blast.php
after installation. - Publish the configuration file using the command:
php artisan vendor:publish --tag=blast-config
- Start Storybook by running the following command from your app’s root directory:
php artisan storybook:launch
This command will install all dependencies, generate stories, and start a Storybook instance with a watch task.
Options
--install
: Force install dependencies--noGenerate
: Skip auto-generating stories based on existing components--port
: Specify the port used to run Storybook
Generating Stories
Blast can also generate stories outside of the launch task. To do this, run the following command:
php artisan storybook:generate-stories
Storybook Configuration
Blast provides global configuration options in config/blast.php
. Some of these options include:
storybook_server_url
: The route Storybook Server uses to render componentsauto_documentation
: Blast can automatically generate documentation pages based on your Tailwind configtailwind_config_path
: The path to your Tailwind config filestorybook_expanded_controls
: Set to true to enable full documentation on the controls tabstorybook_theme
: The array of theme options used by Storybook
For more information on configuring Blast, refer to the official documentation.
Summary
Blast is a component library for Laravel Blade that integrates with Storybook Server. It provides an easy way to render examples of your app’s components using the blade templating engine. By using Blast, you can streamline your component development process in Laravel and generate documentation pages automatically based on your Tailwind config. With its range of features and easy installation process, Blast is a great tool for Laravel developers.