Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Blatui Laravel Package

anousss007/blatui

BlatUI brings shadcn/ui-style, WCAG AA accessible components to the BLAT stack (Blade, Laravel, Alpine, Tailwind). A CLI copies fully themeable, light/dark UI components, blocks, and charts directly into your app so you own and customize the code.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:

    • Native Laravel/Blade Integration: Components are Blade tags (<x-ui.*>), aligning perfectly with Laravel’s view layer. No React/Vue build-step lock-in, reducing complexity.
    • BLAT Stack Alignment: Tailwind CSS (v4), Alpine.js, and Blade are first-class citizens in Laravel, minimizing friction.
    • Design System Maturity: 156+ components with 608 variants and 70 charts provide a comprehensive UI toolkit, reducing custom development effort.
    • Accessibility-First: WCAG AA compliance (verified via axe-core) ensures compliance out of the box, a critical requirement for modern web apps.
    • Theming Flexibility: CSS variables and @theme support enable deep customization without overriding stylesheets.
    • Ownership Model: Components are copied into resources/views/components/ui/, ensuring full control over the codebase (no vendor lock-in).
  • Cons:

    • Tailwind v4 Dependency: Requires upgrading from v3 (if used), which may introduce migration effort.
    • Alpine.js Overhead: While lightweight, Alpine adds a layer of interactivity that may not be needed for all components (e.g., static cards).
    • Monolithic Foundations: The blatui.css and blatui.js foundations are published as single files, which could complicate future modularization or tree-shaking.
    • Chart Dependency: ApexCharts (~100KB) is included for charts, adding bundle size if not all features are used.

Integration Feasibility

  • High for Greenfield Projects: Ideal for new Laravel 11/12/13 projects where Tailwind v4 and Alpine are already in the stack.
  • Moderate for Existing Projects:
    • Tailwind v3 → v4 Migration: Required but manageable with npx @tailwindcss/upgrade.
    • Alpine.js Integration: Existing Alpine users must merge blatui-core.js into their instance (not a breaking change but requires coordination).
    • CSS/JS Merge: Foundations must be imported into existing app.css/app.js, which is additive but requires manual verification.
  • Component Selectivity: Ability to add individual components (e.g., blatui:add button) reduces bloat compared to monolithic UI libraries.

Technical Risk

  • Low for Compatible Stacks:
    • Risk is minimal if using Laravel 11+, Tailwind v4, Alpine.js, and Node 18+.
    • blatui:init command acts as a pre-flight check for misconfigurations.
  • Medium for Legacy Stacks:
    • Tailwind v3 or older Laravel versions require migration effort.
    • Projects without Alpine.js would need to adopt it (though components like <x-ui.card> can be static).
  • Dependency Risks:
    • ApexCharts (~100KB) adds bundle size; exclude if charts aren’t needed.
    • blade-lucide-icons adds ~50KB for icons (optional but recommended for consistency).
  • Long-Term Maintenance:
    • MIT license is permissive, but the package is maintained by a single author (monitor for activity).
    • Component updates are additive; breaking changes are unlikely but possible (e.g., blatui-core.js updates may require re-publishing).

Key Questions for TPM

  1. Stack Compatibility:
    • Is Tailwind v4 already in use, or is a migration feasible?
    • Is Alpine.js acceptable, or are there alternatives (e.g., vanilla JS for static components)?
  2. Component Scope:
    • Will all 156 components be used, or should a subset be adopted incrementally?
    • Are charts/ApexCharts a hard requirement, or can they be excluded?
  3. Customization Needs:
    • Are the default design tokens (e.g., --primary, --destructive) sufficient, or will heavy theming be required?
    • Will components need frequent modifications (e.g., Blade logic), or is copy-paste-and-use sufficient?
  4. Performance:
    • What is the acceptable bundle size impact of blatui.js and ApexCharts?
    • Are there plans to lazy-load components or use dynamic imports?
  5. Team Skills:
    • Does the team have experience with Alpine.js/Tailwind v4, or will ramp-up time be a concern?
    • Is Blade component development familiar, or will training be needed?
  6. CI/CD Impact:
    • How will component updates be handled (e.g., composer update + manual merge checks)?
    • Are there plans to fork or maintain a custom branch of BlatUI?
  7. Accessibility:
    • Has the team audited BlatUI’s WCAG AA compliance, or will additional testing be required?
    • Are there edge cases (e.g., custom form inputs) that might bypass BlatUI’s accessibility guarantees?

Integration Approach

Stack Fit

  • Primary Fit: Laravel 11/12/13 + Tailwind CSS v4 + Alpine.js 3 + Node 18+.

    • Tailwind: BlatUI leverages v4’s @theme and OKLCH color support; v3 requires migration.
    • Alpine: Used for interactivity (e.g., dropdowns, modals, charts). Static components (e.g., <x-ui.card>) can be used without Alpine.
    • Blade: Components are Blade tags (<x-ui.*>), integrating seamlessly with Laravel’s view layer.
    • Node: Required for npm dependencies (e.g., Alpine plugins, ApexCharts).
  • Secondary Fit (with Effort):

    • Laravel 10: Possible but unsupported (requires manual adjustments).
    • Tailwind v3: Requires migration to v4 (use npx @tailwindcss/upgrade).
    • No Alpine: Static components can still be used, but interactive features (e.g., dropdowns) will need custom JS.

Migration Path

  1. Preparation Phase:

    • Audit Stack: Verify Laravel, Tailwind, Alpine, and Node versions.
    • Upgrade Dependencies:
      # Tailwind v3 → v4
      npx @tailwindcss/upgrade
      # Node 16 → 18 (if needed)
      nvm install 18
      
    • Backup Existing Views: Components will be added to resources/views/components/ui/.
  2. Installation:

    composer require anousss007/blatui gehrisandro/tailwind-merge-laravel mallardduck/blade-lucide-icons
    npm install -D alpinejs @alpinejs/anchor @alpinejs/collapse @alpinejs/focus
    php artisan vendor:publish --tag=blatui-foundations
    
    • Verify Setup:
      php artisan blatui:init
      
    • Update Entry Files:
      /* resources/css/app.css */
      @import "tailwindcss";
      @import "./blatui.css";  // Add after Tailwind
      
      // resources/js/app.js
      import "./blatui.js";  // Or merge into existing Alpine setup
      
  3. Component Adoption:

    • Incremental Addition:
      php artisan blatui:add button card input
      
    • Bulk Addition (for rapid prototyping):
      php artisan blatui:add --all
      
    • Review Dependencies: blatui:add will suggest additional composer/npm packages (e.g., ApexCharts for charts).
  4. Customization:

    • Theme Overrides: Modify resources/css/blatui.css (published tokens).
    • Component Tweaks: Edit files in resources/views/components/ui/ directly.
    • Alpine Integration: For existing Alpine setups, use registerBlatUI(Alpine) before Alpine.start().

Compatibility

  • Blade: Zero compatibility issues; components are Blade tags.
  • Tailwind: v4 is required for @theme and OKLCH support. v3 projects must upgrade.
  • Alpine: Components use Alpine for interactivity. Static usage is possible but limited.
  • CSS: BlatUI’s blatui.css must be imported after Tailwind to override defaults.
  • JS: blatui.js boots Alpine and plugins. Existing Alpine setups must merge blatui-core.js.

Sequencing

  1. Foundations First:
    • Publish blatui-foundations before adding any components.
    • Verify with blatui:init.
  2. Core Components:
    • Start with high-priority components (e.g., button, card, input).
  3. Interactive Features:
    • Add components with Alpine dependencies (e.g., dropdown-menu, modal) after confirming Alpine setup.
  4. Charts/Advanced:
    • Install ApexCharts and related components last (highest bundle impact).
  5. Blocks/Layouts:
    • Use blatui:add --all for full-page templates (e.g., dash
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor