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

Twigcn Bundle Laravel Package

ducrot/twigcn-bundle

TwigcnBundle brings shadcn/ui-inspired, accessible UI components to Symfony & Twig. Install the PHP bundle plus the @ducrot/twigcn-ui NPM package and compile Tailwind CSS to use ready-made, themeable components in your templates.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate UI Development: Reduces time-to-market for new features by providing pre-built, accessible UI components (e.g., modals, forms, navigation) that align with modern design systems (Tailwind CSS). Eliminates the need to design, code, and test low-level UI elements from scratch.
  • Consistent Branding: Enables standardized theming (colors, spacing, typography) across applications via CSS custom properties, ensuring visual consistency with minimal effort.
  • Build vs. Buy Decision: Justifies adopting a composable UI library over custom development for reusable components (e.g., accordions, dropdowns, alerts), reducing technical debt.
  • Roadmap Priorities:
    • Phase 1: Integrate core components (buttons, forms, modals) into existing Symfony apps to unify UI patterns.
    • Phase 2: Expand to complex layouts (sidebars, tables, carousels) for dashboards or admin panels.
    • Phase 3: Leverage interactive elements (drawer, tooltip, theme switcher) to enhance UX without frontend team bottlenecks.
  • Use Cases:
    • Admin Panels: Rapidly prototype CRUD interfaces with pre-styled forms, tables, and modals.
    • Public-Facing Apps: Build accessible, mobile-friendly interfaces (e.g., landing pages, checkout flows) with minimal custom CSS.
    • Internal Tools: Standardize UI across microservices or legacy apps by replacing inconsistent Bootstrap/Tailwind implementations.

When to Consider This Package

  • Adopt If:
    • Your team uses Symfony 7.0+ and Tailwind CSS 4.0+ (or plans to migrate).
    • You need accessible, interactive components (e.g., modals, accordions, dropdowns) without deep frontend expertise.
    • Your project prioritizes developer velocity over full customization (e.g., startups, MVPs, internal tools).
    • You’re already using Stimulus.js or Symfony UX for interactivity.
  • Look Elsewhere If:
    • Your stack excludes PHP 8.2+, Symfony, or Node.js 22+ (e.g., Laravel, Python, or static sites).
    • You require highly customized animations or animations not covered by Stimulus (consider Framer Motion or GSAP).
    • Your design system is heavily branded and requires deep overrides (e.g., custom icons, non-Tailwind CSS).
    • You need server-side rendering (SSR) compatibility beyond Symfony (e.g., for Next.js or SvelteKit).
    • Your team lacks Node.js/Tailwind expertise to debug build pipelines (e.g., AssetMapper, Vite).
  • Alternatives to Evaluate:
    • shadcn/ui: If you’re open to React/Vue/Svelte (not Symfony-specific).
    • Tailwind UI: For simpler, non-interactive components (paid).
    • Symfony UX Turbo/Stimulus: If you only need basic interactivity without pre-built components.
    • Custom Components: If your design system is unique or requires proprietary animations.

How to Pitch It (Stakeholders)

For Executives/Business Leaders

*"This package lets our team build polished, accessible UIs 3–5x faster by reusing pre-built components (like modals, forms, and navigation menus) instead of designing them from scratch. It’s like using Lego blocks for our frontend—consistent, reliable, and easy to assemble. For example:

  • Launch features faster: Cut UI development time for dashboards or checkout flows by 60%.
  • Reduce costs: No need to hire specialized frontend talent for basic components.
  • Improve UX: Built-in accessibility (WCAG compliance) and interactive elements (drawer menus, tooltips) enhance user satisfaction.
  • Future-proof: Aligns with modern tools (Tailwind CSS, Symfony 7) and scales as our product grows.

Investment: Minimal (Composer/NPM install + ~1 hour setup). ROI: Faster iterations, lower dev costs, and a more cohesive product experience."*

For Engineering Leaders

*"Pros:

  • Symfony-native: Integrates seamlessly with Symfony UX, Twig, and Stimulus—no framework lock-in beyond PHP.
  • Tailwind-powered: Leverages our existing Tailwind setup for theming and responsive design.
  • Accessible by default: Components follow WAI-ARIA standards, reducing QA effort for compliance.
  • Low maintenance: MIT-licensed, actively maintained (via the parent repo), and composable—we can extend or override components as needed.
  • DevEx boost: Frontend engineers spend less time on boilerplate and more on business logic.

Trade-offs:

  • Build pipeline dependency: Requires Node.js/Tailwind setup (but we already use Tailwind).
  • Limited customization: Not a design system—better for consistency than uniqueness.
  • Stimulus-only interactivity: Complex animations may need custom JS.

Recommendation: Pilot with 2–3 high-impact pages (e.g., admin dashboard, checkout) to validate velocity gains before full adoption."*

For Developers

*"Why This Rocks:

  • Zero CSS/JS from scratch: Need a modal? <twig:Twigcn:Dialog>—done. Accessible, styled, and interactive.
  • Twig-first: Works natively with Symfony templates; no React/Vue context switching.
  • Tailwind synergy: Extend or override styles using Tailwind classes or CSS variables.
  • Stimulus controllers: Interactive elements (drawer, tooltip) are pre-wired—just include them in controllers.json.
  • Dark mode: Built-in toggle with CSS variables.

Gotchas:

  • Build step required: Tailwind CLI or Vite must process CSS (but we’re already doing this).
  • Component naming: Some Twig tags differ from PHP classes (e.g., <twig:Twigcn:Switch>SwitchComponent).
  • Vite recommended: For TypeScript/advanced setups, but AssetMapper works for simple projects.

Quick Win: Replace 3 custom modals/forms with this package—save 10+ hours of dev time."*

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.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony