- How do I install Laravel Cube in my Laravel project?
- Run `composer require nasirkhan/laravel-cube` in your project directory. The package will auto-discover and register Blade components. For Tailwind CSS support, manually import the required CSS in your build setup (e.g., `resources/css/app.css`). Bootstrap 5 users get styles automatically via the package.
- Can I use Tailwind CSS and Bootstrap 5 components together in the same Laravel app?
- Yes, Laravel Cube allows per-component framework selection. For example, use `<x-cube::button :framework="tailwind">` for Tailwind buttons and `<x-cube::modal>` (defaulting to Bootstrap) in the same view. This enables gradual migration or mixed usage.
- Does Laravel Cube work with Livewire 3 or 4?
- Absolutely. The package is explicitly designed for Livewire compatibility, with components optimized for dynamic interactions. Tested with Livewire 3 and 4, ensuring smooth integration for real-time updates without refactoring.
- What Laravel and PHP versions does Laravel Cube support?
- The package requires **Laravel 10+** and **PHP 8.3+**. If your project uses older versions, check the GitHub issues for potential backports or alternatives. Always verify compatibility before installation.
- How do I customize or override the default styles of Cube components?
- Publish the package’s assets using `php artisan vendor:publish --tag=cube-views` to copy Blade templates and configs to your project. Override styles by extending the published CSS or modifying the Blade templates in `resources/views/vendor/cube`.
- Is Laravel Cube actively maintained? How can I check?
- As of 2026 (hypothetical release), verify maintenance by checking GitHub for recent commits, open issues, or pull requests. Look for responses from the author (nasirkhan) on issues or the [Laravel Starter](https://github.com/nasirkhan/laravel-starter) project, where Cube is used.
- Are there any known conflicts with existing Tailwind or Bootstrap setups?
- Tailwind users must manually import Cube’s CSS to avoid duplicate utility classes. Bootstrap 5 styles are self-contained. For conflicts, inspect the published assets or use Tailwind’s `!important` sparingly. Test components in isolation before full integration.
- Does Laravel Cube support dark mode out of the box?
- Yes, Tailwind-based components include built-in dark mode support via Flowbite’s dark mode utilities. For Bootstrap 5, you’ll need to manually enable dark mode in your project’s CSS (e.g., using CSS variables). The package simplifies dark mode implementation for Tailwind users.
- What are the alternatives to Laravel Cube for reusable UI components?
- Consider **Filament UI** for admin panels, **Livewire Tailwind** for Livewire-specific components, or **Laravel Breeze** for authentication-focused UI. For broader Tailwind support, explore **Flowbite** (standalone) or **Alpine.js**-based solutions like **Laravel Jetstream**. Cube stands out for its dual framework support and Livewire integration.
- How do I add social sharing buttons alongside Cube components?
- Use the companion package [`nasirkhan/laravel-sharekit`](https://github.com/nasirkhan/laravel-sharekit), which integrates seamlessly with Cube. Install it via Composer, then use `<x-sharekit::buttons>` in your layouts or Blade views. Sharekit handles metadata auto-detection and popup sharing independently of Cube’s UI components.