A Laravel component library documentation tool inspired by Storybook. Build, test, and document your Laravel Blade components, Livewire components, and view components in an isolated environment.
- 🔍 Auto-discovery of Blade, Livewire, and class-based components
- 🎨 Live preview with real-time prop editing
- 📱 Responsive testing with multiple viewport sizes
- 🌙 Theme support (light/dark mode)
- 📚 Documentation with markdown support
- 🔗 Deep linking to specific component states
- ⚡ Hot reload during development
- 🎯 Isolated environment for component testing
Either create a fresh Laravel project or use an existing one:
# Fresh Laravel project
composer create-project laravel/laravel my-project
cd my-project
# Or use existing Laravel project
cd your-existing-projectAdd Larastory to your project:
composer require timbogdanov/larastory --devAdd the following line to your hosts file to enable subdomain access:
Mac/Linux - Edit /etc/hosts:
127.0.0.1 larastory.your-project.test
127.0.0.1 your-project.testReplace your-project.test with your actual Laravel project domain.
composer run devVisit your Larastory interface at:
http://larastory.your-project.test:8000By default, Larastory runs on the larastory subdomain of your main project.
Publish the configuration file to customize Larastory:
php artisan vendor:publish --tag=larastory-config
The configuration file config/larastory.php allows you to customize:
return [
// Subdomain for Larastory (default: 'larastory')
'subdomain' => env('LARASTORY_SUBDOMAIN', 'larastory'),
// Directories to scan for components
'component_paths' => [
'resources/views/components',
'app/View/Components',
'app/Livewire',
],
// Auto-discovery of components
'auto_discovery' => true,
];To use a different subdomain, add to your .env file:
LARASTORY_SUBDOMAIN=ui
Then update your hosts file accordingly:
127.0.0.1 storybook.your-project.test
🚧 This package is currently in early development.
We welcome contributions! Please see CONTRIBUTING.md for details.
Inspired by Storybook
Star ⭐ this repo if you find it useful!