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

Inky Extra Laravel Package

twig/inky-extra

Twig extension adding an inky_to_html filter to convert ZURB Inky email templates into responsive HTML. Useful for generating email markup from simple Inky components directly within Twig templates.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified Email Development Workflow: Enables teams to use Twig for both web and email templates, reducing context-switching and leveraging existing Twig macros/filters for consistent design systems. Critical for roadmap items requiring omnichannel consistency (e.g., web and email sharing the same components).
  • Accelerated Marketing Campaigns: Cuts email template development time by 30–50% for high-volume campaigns (e.g., newsletters, promotions) by replacing manual HTML with Inky’s semantic markup. Aligns with roadmap goals for faster time-to-market in marketing initiatives.
  • Transactional Email Modernization: Replaces legacy table-based HTML (e.g., nested <table> spam) with semantic, maintainable templates for critical flows like password resets, order confirmations, and invoices. Reduces support tickets and rendering bugs across email clients.
  • Component-Driven Email Design: Supports reusable email components (e.g., headers, footers, buttons) via Twig macros, enabling scalable updates (e.g., brand rebranding, accessibility compliance) without rewriting templates. Ideal for roadmap items requiring modularity and scalability.
  • Cross-Client Compatibility: Ensures consistent rendering in Gmail, Outlook, Apple Mail, and others by leveraging Inky’s table-based fallbacks and CSS resets. Mitigates risks for roadmap items like financial disclosures or legal notices where rendering accuracy is critical.
  • Cost-Effective Scalability: Eliminates the need for custom email rendering solutions, reducing technical debt and maintenance costs. The MIT license and zero runtime overhead (when cached) make it a low-risk, high-reward addition to Laravel/Symfony stacks.
  • A/B Testing and Personalization: Enables dynamic email variants (e.g., subject line tests, content swaps) by combining Twig’s logic with Inky’s rendering. Supports roadmap goals for data-driven marketing without sacrificing template consistency.
  • Accessibility and Compliance: Facilitates WCAG-compliant email design by leveraging Inky’s semantic markup, reducing legal risks for roadmap items requiring ADA/Section 508 compliance (e.g., healthcare communications, financial statements).
  • Developer Productivity: Reduces frontend-backend handoff friction by allowing backend teams to own email templates alongside web views. Ideal for teams with limited frontend resources or distributed workflows.
  • Future-Proof Architecture: Aligns with modern email best practices (responsive design, semantic markup) and integrates with Twig’s ecosystem, ensuring long-term maintainability for roadmap items with evolving email requirements.

When to Consider This Package

Adopt When:

  • Your project uses Twig (Laravel/Symfony) and requires responsive, maintainable email templates without manual HTML maintenance.
  • You’re building transactional emails (e.g., password resets, order confirmations) or marketing campaigns requiring cross-client consistency.
  • Your team already uses ZURB Inky syntax or plans to adopt it for cleaner, semantic email markup.
  • You prioritize developer productivity over custom solutions, especially for teams with limited frontend email expertise.
  • Your Twig version ≥3.13 and PHP ≥8.1 (check via composer show twig/twig and php -v).
  • You need to reduce email development time by 30–50% while improving cross-client compatibility.
  • Your roadmap includes scalable email solutions (e.g., high-volume newsletters, dynamic invoices) that require modular, reusable templates.
  • Your organization values component-driven design and wants to apply the same principles to emails as to web applications.
  • You’re migrating from Blade to Twig or already use Twig for other server-side rendering needs.
  • You need to integrate email templating with existing Twig macros, filters, or extensions (e.g., for dynamic content or localization).
  • Your CI/CD pipeline includes email testing (e.g., Litmus/Email on Acid) to validate cross-client rendering.

Avoid When:

  • Your project uses Blade exclusively without plans to migrate to Twig (requires full view engine swap).
  • You have no email templating needs or rely on client-side dynamic rendering (e.g., JS-based emails).
  • Your stack is legacy (e.g., PHP <8.0, Twig <3.13) and lacks resources for dependency updates.
  • You need advanced email interactivity (e.g., embedded forms, real-time updates) beyond static HTML.
  • Your team lacks Twig familiarity, as the package assumes basic Twig syntax knowledge (e.g., filters, macros).
  • Your email templates are highly dynamic and require complex variable resolution before Inky conversion (may need extensive pre-processing).
  • You’re constrained by strict email client requirements (e.g., legacy systems requiring non-table-based HTML or proprietary tags).
  • Your CI/CD pipeline lacks email testing, making cross-client validation cumbersome.
  • You require offline email generation (e.g., for downloadable PDFs or local storage), as Inky is designed for server-side rendering.
  • Your project has no budget for training to onboard teams to Inky syntax or Twig’s email-specific workflows.

How to Pitch It (Stakeholders)

For Executives:

*"This package eliminates email as a technical bottleneck, turning it into a scalable, cost-effective asset for customer communications. Here’s the business case:

Problem:

  • Broken emails cost your team $X/year in support tickets and lost revenue (e.g., misaligned buttons, broken links).
  • Marketing campaigns take days to launch due to manual HTML tweaks for Outlook/Gmail quirks.
  • Compliance risks (e.g., ADA/Section 508) require manual accessibility audits for every email template.

Solution:

  • 30–50% faster email development with Inky’s semantic markup, reducing time-to-market for campaigns.
  • Zero broken emails—consistent rendering across Gmail, Outlook, Apple Mail, and more.
  • Reusable components (e.g., headers, footers) for scalable updates (e.g., brand rebranding, accessibility fixes).
  • Lower costs: No need to build/maintain a custom email renderer. MIT-licensed, zero runtime overhead when cached.

ROI:

  • Month 1: Pilot with 2 email templates; 50% faster development.
  • Month 3: Full rollout for transactional emails; 30% reduction in support tickets.
  • Month 6: Scale to marketing campaigns; 20% increase in email engagement metrics.

Ask for:

  • Approval to migrate 1–2 high-impact email templates (e.g., password resets, newsletters) as a pilot.
  • Budget for cross-client testing tools (e.g., Litmus) to validate rendering.
  • Developer time to integrate and train the team on Inky syntax.

Why Now? This isn’t just a tool—it’s a strategic lever to differentiate your customer communications while cutting costs. Let’s start with a low-risk pilot to prove the value."*


For Engineering:

*"Stop wasting time on Outlook hacks. This package lets you write emails in a clean, component-based way—then convert them to production-ready HTML with a single Twig filter. Here’s how to use it in Laravel/Symfony:


Quick Start (5-Minute Setup)

  1. Install the package:
    composer require twig/inky-extra
    
  2. Register the extension (Laravel: automatic if using spatie/laravel-twig; else add to config/twig.php):
    // For Symfony/Laravel (manual registration)
    $twig->addExtension(new \Twig\Extra\Inky\InkyExtension());
    
  3. Write your first Inky template (e.g., resources/views/emails/welcome.inky):
    <container>
      <row>
        <columns large="6">
          <h1>Welcome, {{ name }}!</h1>
          <p>Thanks for signing up.</p>
        </columns>
      </row>
    </container>
    
  4. Render it in Twig:
    {% set name = "John" %}
    {{ include('emails/welcome.inky', {'name': name}) | inky_to_html }}
    
  5. Test in real clients (Gmail, Outlook, Apple Mail) using Litmus or Email on Acid.

Key Use Cases

Use Case Implementation Example Benefits
Transactional Emails
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport