A modern Laravel Blade component library based on Flowbite + Tailwind CSS, with an intuitive Style Props API for elegant component styling.
Flowblade embraces a server-side component-driven architecture using Laravel Livewire and Alpine.js, offering significant development efficiency improvements over traditional API + Vue/React approaches:
- Faster Development: Build interactive UIs without context-switching between backend and frontend frameworks. Write PHP and Blade templates, leverage Livewire for reactivity. 30-50% faster development compared to traditional API + Vue/React approaches.
- Reduced Complexity: No need to manage separate API endpoints, state management libraries, or complex build pipelines. Everything integrates seamlessly with Laravel.
- Better DX: Full-stack developers can work on features end-to-end without learning multiple frameworks. Blade components are familiar to Laravel developers.
- Smaller Bundle Size: Alpine.js (15KB) vs Vue/React (40KB+), resulting in faster page loads and better performance.
- Real-time Reactivity: Livewire provides real-time component updates without writing JavaScript, while Alpine.js handles lightweight interactivity.
- SEO-Friendly: Server-rendered HTML by default, perfect for content-heavy applications.
- Reduced Tech Stack: Single language (PHP) instead of managing PHP + JavaScript/TypeScript. Eliminates context-switching and reduces cognitive load.
- Lower Learning Curve: Developers only need to know Laravel and Blade, not Vue/React/Angular. Onboarding time reduced by 40-60% for new team members.
- Simplified Deployment: Deploy as a single Laravel application. No separate frontend build process, no Node.js in production, no API versioning concerns.
- Faster Iteration: Changes to UI logic don't require rebuilding frontend assets. Hot reload works seamlessly with Laravel's development server.
- Admin Dashboards: Rapid development of internal tools with real-time updates and complex forms
- Small to Medium Web Applications: Content management systems, SaaS platforms, business applications
- Laravel Applications: Seamless integration with Laravel's ecosystem
- Full-Stack Teams: Developers comfortable with PHP and Blade templates
- Rapid Prototyping: Build features quickly without framework overhead
- Content-Heavy Sites: Server-side rendering with progressive enhancement
- Real-time Applications: Livewire's reactive components for live updates
- π¨ 138+ Components - Comprehensive UI component library
- π Style Props System - Intuitive props like
color="primary"andsize="lg"for flexible styling - π― Tailwind CSS - Built on Tailwind's utility-first approach
- β‘ Alpine.js Ready - Built-in Alpine.js integration
- π Livewire Compatible - Full support for
wire:model,wire:click, etc. - π Iconify Support - Access 100,000+ icons with
<x-icon name="heroicons:check" /> - ποΈ Highly Configurable - Customize colors, sizes, and component prefixes
- π¦ Zero Config - Works immediately after
composer require
Before installing Flowblade, ensure your project meets these requirements:
- Laravel: 11.0 or higher
- PHP: 8.3 or higher
- Tailwind CSS: 4.0 or higher
- Node.js: 16.0 or higher (for asset compilation)
Flowblade requires the following packages (automatically installed):
- flowbite: ^3.0 - Design system and JavaScript components
- tailwindcss: ^4.0 - Utility-first CSS framework
- @tailwindcss/forms: ^0.5 - Form styling plugin
For enhanced functionality, you may want to install:
- Alpine.js: ^3.0 - For lightweight interactivity (included in Flowbite)
- Livewire: ^3.0 - For reactive components (
composer require livewire/livewire) - Iconify: For icon support (included via CDN)
composer require mellivora/flowbladeTo customize component prefixes, colors, and sizes:
php artisan vendor:publish --tag=flowblade-configThis creates config/flowblade.php where you can configure:
- Component prefix (default:
x-) - Default colors and sizes
- Color and size mappings
See the Quick Start Guide for detailed configuration options.
Add Flowblade views to your tailwind.config.js:
export default {
content: [
"./resources/**/*.blade.php",
"./vendor/mellivora/flowblade/resources/views/**/*.blade.php",
],
}npm run devFor detailed setup instructions and configuration options, see:
- Quick Start Guide - Get started in 5 minutes
- Installation Guide - Step-by-step setup instructions
- Components Documentation - Complete component reference
- Style Props System - Intuitive styling with props
Flowblade includes a powerful Style Props system that allows you to style components using intuitive props instead of writing Tailwind classes directly:
{{-- Padding --}}
<x-box p="6">All sides</x-box>
<x-box px="4" py="8">Horizontal and vertical</x-box>
<x-box pt="2" pr="4" pb="6" pl="8">Individual sides</x-box>
{{-- Margin --}}
<x-box m="4">All sides</x-box>
<x-box mx="auto">Horizontal centering</x-box>
<x-box my="6">Vertical margin</x-box>{{-- Width and Height --}}
<x-box w="full" h="64">Full width, 16rem height</x-box>
<x-box w="1/2" h="auto">Half width, auto height</x-box>
<x-box minW="xs" maxW="2xl">Min/max width constraints</x-box>
<x-box minH="screen" maxH="96">Min/max height constraints</x-box>{{-- Background and Text Colors --}}
<x-box bg="primary" color="white">Primary background</x-box>
<x-box bg="blue.500" color="gray.700">Using color scales</x-box>
<x-box borderColor="red.300">Border color</x-box>{{-- Display and Position --}}
<x-box display="flex" position="relative">Flex layout</x-box>
<x-box display="grid" zIndex="10">Grid layout</x-box>
<x-box overflow="hidden" overflowY="auto">Overflow control</x-box>{{-- Flex Container --}}
<x-box flex="1" flexDirection="column" alignItems="center" justifyContent="between" gap="4">
Flex layout with gap
</x-box>{{-- Text Styling --}}
<x-box fontSize="lg" fontWeight="bold" textAlign="center" lineHeight="tight">
Styled text
</x-box>{{-- Borders and Rounded Corners --}}
<x-box border="2" borderColor="gray.300" rounded="lg">Bordered box</x-box>
<x-box rounded="full">Fully rounded</x-box>
<x-box borderRadius="xl">Large radius</x-box>{{-- Shadows and Effects --}}
<x-box shadow="md" opacity="75">Box with shadow</x-box>
<x-box shadow="lg" cursor="pointer" transition="all">Interactive box</x-box>primary secondary success warning danger info gray blue red green yellow purple pink indigo cyan teal
Each color supports scales: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
2xs xs sm md lg xl 2xl 3xl 4xl
solid outline ghost link subtle
<x-box p="8" shadow="lg" rounded="xl" maxW="md" mx="auto">
<x-vstack spacing="md">
<x-heading size="lg">Contact Form</x-heading>
<div>
<label class="block text-sm font-medium mb-2">Name</label>
<x-input placeholder="Your name" />
</div>
<div>
<label class="block text-sm font-medium mb-2">Email</label>
<x-input type="email" placeholder="[email protected]" />
</div>
<div>
<label class="block text-sm font-medium mb-2">Message</label>
<x-textarea placeholder="Your message" rows="4" />
</div>
<x-hstack spacing="md" justify="end">
<x-button variant="outline">Cancel</x-button>
<x-button color="primary">Send</x-button>
</x-hstack>
</x-vstack>
</x-box><x-grid columns="4" gap="6">
@foreach($stats as $stat)
<x-card shadow="md" rounded="lg">
<x-card-body>
<x-vstack spacing="md">
<x-hstack justify="between" align="start">
<x-vstack spacing="xs">
<x-text color="gray.600" fontSize="sm">{{ $stat['label'] }}</x-text>
<x-heading size="2xl">{{ $stat['value'] }}</x-heading>
</x-vstack>
<x-icon :name="$stat['icon']" size="32px" color="primary" />
</x-hstack>
<x-text color="green.600" fontSize="sm">{{ $stat['change'] }}</x-text>
</x-vstack>
</x-card-body>
</x-card>
@endforeach
</x-grid><x-navbar bg="white" shadow="md">
<x-navbar-brand href="/">
<x-heading size="lg">MyApp</x-heading>
</x-navbar-brand>
<x-navbar-collapse>
<x-navbar-link href="/features">Features</x-navbar-link>
<x-navbar-link href="/pricing">Pricing</x-navbar-link>
<x-navbar-link href="/docs">Documentation</x-navbar-link>
</x-navbar-collapse>
<x-hstack spacing="md">
<x-button variant="ghost">Sign In</x-button>
<x-button color="primary">Get Started</x-button>
</x-hstack>
</x-navbar>Flowblade includes 138+ production-ready components organized by category. All components feature:
- β Style Props Support - Intuitive styling system with semantic props
- β Complete Documentation - Detailed usage examples and API reference
- β Accessibility Features - WCAG 2.1 compliant with keyboard navigation
- β Responsive Design - Mobile-first approach with Tailwind CSS
- β Flowbite Integration - Built on Flowbite design system
For a complete list of all components with detailed documentation, see Components Documentation.
- Installation Guide - Step-by-step setup instructions
- Components Documentation - Complete component reference
- Development Plan - Project roadmap and progress
- Flowbite Documentation - Design system reference
- Tailwind CSS Documentation - Utility-first CSS framework
- Laravel Documentation - Laravel framework reference
- Iconify Icons - Browse available icons
Contributions are welcome! Here's how you can help:
- Report Issues - Found a bug? Open an issue
- Suggest Features - Have an idea? Create a feature request
- Submit Pull Requests - Want to contribute code? Fork and submit a PR
- Improve Documentation - Help us improve docs and examples
# Clone the repository
git clone https://github.com/zhouyl/flowblade.git
cd flowblade
# Install dependencies
composer install
npm install
# Run tests
composer test
# Build documentation
npm run buildMIT License. See LICENSE for details.
- GitHub: https://github.com/zhouyl/flowblade
- Packagist: https://packagist.org/packages/mellivora/flowblade
- Issues: https://github.com/zhouyl/flowblade/issues
- Discussions: https://github.com/zhouyl/flowblade/discussions
If you find Flowblade helpful, please consider:
- β Starring the repository
- π Reporting bugs and suggesting features
- π Contributing to documentation
- π€ Sharing with the community