Awesome Open Source
Awesome Open Source

Awesome Twig Awesome

A curated list of snippets, tutorials, extensions for Twig created by Fabien Potencier and PHP frameworks using Twig

You might also like awesome-php.

Please read the contribution guidelines before contributing.



  1. Drupal Twig
  2. Timber Twig
  3. Craft Twig
  4. - A collection of useful Twig snippets.

CMS & frameworks using Twig

Packagist for Frameworks | Packagist for CMS

  • Symfony - PHP framework created by Fabien Potencier, also creator of Twig
  • Silex - PHP micro-framework based on Symfony also created by Fabien Potencier
  • ezPublish - open source enterprise PHP content management system
  • Themosis - A WordPress framework
  • Drupal8 - Popular PHP CMS
  • Timber - Templating system for Wordpress
  • OctoberCMS - PHP CMS based on Laravel
  • CraftCMS - Focused content management for web professionals
  • phpBb - Free and Open Source Forum Software

There's also a lot of frameworks & cms created by community using twig. There is also many packages integration for other frameworks such as Laravel, Slim, Yii Framework, CodeIgniter, CakePHP, etc.

Stack Overflow



  • Paginator Twig Extension - Twig extension to help generate simple paginations in Twig templates.
  • Truncate Text - A custom twig extension to truncate text while preserving HTML tags.
  • HTML Compress - Twig extension for compressing HTML and inline CSS/JS using WyriHaximus/HtmlCompress
  • Breakpoints - Twig extension to set breakpoints
  • PHP Functions - This extension allows you to call (almost) any PHP function from your Twig templates.
  • Var Type Checker - Simple var type checker for Twig
  • core23/twig-extensions - Bunch of awesome twig extensions by core23
  • twigphp/twig-extensions - Bunch of awesome official twig extensions
  • jasny/twig-extensions - Bunch of awesome twig extensions by jasny
  • kzykhys/twig-extensions - Bunch of awesome twig extensions by kzykhys
  • vudaltsov-legacy/twig-extensions - Bunch of awesome twig extensions by kzykhys
  • JMB-Technology-Limited/twig-extensions - Bunch of awesome twig extensions by JMB-Technology-Limited
  • SortByField - A Twig Extension filter to sort an array of entries (objects or arrays) by an entry field.
  • Assetic - Twig extension of PHP assets manager
  • Asset Version - Render versioned asset filenames in twig.
  • Laravel DebugBar - Twig extensions for the Laravel library LaravelDebugBar
  • PHP DebugBar - A Twig extension to provide access to PHP Debug Bar's rendering functions.
  • Twi18n - Powerful Twig translation extension using PHP's gettext.
  • Cache - Cache fragments of templates directly within Twig.
  • Markdown - Twig extension to work with Markdown content
  • Markdown² - A simple twig markdown extension.
  • Defer Block Rendering - An extension for Twig that allows to defer block rendering
  • GetText Extractor - friendly tool which extracts translations from twig templates.
  • Twig Lambda - Lambda expressions for Twig and filters that make use of them
  • EmailObfuscator - A text filter for automatic email obfuscation using the well-established Javascript and a CSS fallback:
  • Configurable i18n - extension allowing you to customize which functions to use for translations.
  • Webpack - Inject your webpack entry points into twig templates with easy.
  • Country - Twig country filter extension for twig
  • MobileDetect - MobileDetect-integration for Twig
  • emberlabs/Gravatar - easy gravatar twig integration by emberlabs
  • ry167Gravatar² - An extension for Twig that provides simple filters for Gravatar by ry167.
  • HTML Helpers - Rails style view helpers for HTML tags in PHP Twig
  • QRCode - A Twig extension for embedding inline QR codes in Twig templates
  • Whitespace Collapse - Whitespace collapse extension for Twig
  • Const Resolver - Simple Twig plugin to resolve constant on template cache build
  • OrdinalNumber - A Twig Extension filter to format number into ordinal form (1st, 2nd, etc.).
  • Apply Filters - This filter allows you to call dynamic filters in twig.
  • Strftime - use strftime function in twig
  • SVG - Add inline svg with Twig$
  • csg4twig - A CSV escaping filter for the Twig templating engine.
  • Share - Twig extension providing social share links
  • Parsedown (Markdown Parser) - Parsedown's Markdown parser Extension
  • Linewrap - Twig filter to wrap lines exceeding the specified length.
  • Inflection - Filters (singularize and pluralize)
  • Array Group - Twig filter that splits an array into a given number of groups (unlike batch, which splits the array based on items per group)
  • Geshi - Twig extension to work with Geshi - Generic Syntax Highlighter rendering
  • Natural Join - Twig filter that joins an array using a different separator for the last element
  • Gist - A simple Twig extension for embedding GitHub Gist snippets into Twig templates.
  • Resource - Resource handling for Twig templates
  • LocaleName - Twig locale name filter extension for twig
  • Safe Date - A safe date function in twig that will not set null dates to today.
  • Useful HTML Extension - Some useful Twig functions for context-relevant class rendering.
  • CSRF Helpers - CSRF (Cross-Site Request Forgery) protection helpers for the Twig templating engine.
  • Linkify - Twig extension for Linkify - converts URLs and email addresses into HTML links
  • HTMLStrip - Filter for Twig to convert HTML into Text
  • List Loop - A different way to display lists, grids and tables in Twig: the list loop.
  • faker - Integration of PHP faker library with the twig templating system.
  • Twital - It's a plugin for Twig that adds some sugar syntax, which makes its templates similar to PHPTal or VueJS.


Code editors & IDE extensions

Check this page to discover the multiples extensions for IDE & code editors created by community


Coming soon


  • TwigExpress - Getting started with Twig templates thanks to a simple PHP script
  • TwigFiddle - Develop, run, store and access Twig code online
  • Twigcs - Check for violations on Twig coding standard
  • Read more

Javascript Alternatives

Python Alternatives



To the extent possible under law, Julien RAVIA has waived all copyright and related or neighboring rights to this work.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
awesome (1,383
awesome-list (1,302
template-engine (133
twig (101
awesome-lists (76
templating (48
template-language (23
twig-extension (20
frameworks (19