# eSheep Twigs > A framework-agnostic Twig extension for building HTML: tag and attribute helpers, class variants, and Tailwind class merging. Reach for eSheep Twigs (Composer package `esheep/twigs`) when a PHP project renders HTML with Twig and needs to build tags from attribute hashes, merge attributes for reusable components, define class variants (CVA), or resolve Tailwind CSS class conflicts. Install it with `composer require esheep/twigs` and register `new \eSheep\Twigs\Extension()` on the Twig environment. ## Docs - [Introduction](https://yaserahmady.github.io/twigs): eSheep Twigs is a framework-agnostic Twig extension that adds HTML tag and attribute helpers, class variants (CVA), and Tailwind class merging through one extension class. - [Installation](https://yaserahmady.github.io/twigs/installation): Install esheep/twigs with Composer and register the extension on a Twig environment, in plain PHP or in Symfony. - [Configuration](https://yaserahmady.github.io/twigs/configuration): Constructor options for eSheep\Twigs\Extension — inject a configured TailwindMerge instance and set the default options of the merge_attributes filter. ## Guides - [Attribute hashes](https://yaserahmady.github.io/twigs/guides/attributes): The attribute hash format every eSheep Twigs helper accepts — encoding, boolean attributes, class and style values, data/aria/hx prefixes, and the remove_class pseudo-attribute. - [Building components](https://yaserahmady.github.io/twigs/guides/components): Build a reusable Twig component with cva() for class variants, merge_attributes to accept the caller's attributes, and the tag block to render it. ## Reference - [Functions](https://yaserahmady.github.io/twigs/reference/functions): Reference for the tag(), attr(), cva() and ray() Twig functions in eSheep Twigs — arguments, return values, aliases and examples. - [Filters](https://yaserahmady.github.io/twigs/reference/filters): Reference for the attr, remove_class, merge_attributes, tailwind_merge and ray Twig filters in eSheep Twigs — arguments, merge rules, options and examples. - [Tags](https://yaserahmady.github.io/twigs/reference/tags): Reference for the tag and html_tag block tags in eSheep Twigs — wrap template content in an element built from a tag name and an attribute hash. ## Agent skills - [esheep-twigs](https://yaserahmady.github.io/twigs/.well-known/agent-skills/esheep-twigs/SKILL.md): Use when writing or reviewing Twig templates in a PHP project that uses eSheep Twigs (Composer package esheep/twigs, class eSheep\Twigs\Extension), or when setting it up. Covers the tag() and attr() functions, the {% tag %} / {% html_tag %} block, the |attr, |remove_class, |merge_attributes and |tailwind_merge (|tw_merge) filters, cva() class variants, attribute hashes (class, style, data/aria/hx prefixes, remove_class), building reusable Twig components, and Tailwind CSS class merging in Twig. ## Agent resources - [llms-full.txt](https://yaserahmady.github.io/twigs/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://yaserahmady.github.io/twigs/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://yaserahmady.github.io/twigs/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://yaserahmady.github.io/twigs/openapi.json. - [Agent skills](https://yaserahmady.github.io/twigs/.well-known/agent-skills/index.json): Agent Skills discovery index of the skills this site publishes. - [API catalog](https://yaserahmady.github.io/twigs/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [AI catalog](https://yaserahmady.github.io/twigs/.well-known/ai-catalog.json): ARD manifest of the agent-facing resources on this site (MCP server, skills, APIs). - [agent-readability.json](https://yaserahmady.github.io/twigs/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://yaserahmady.github.io/twigs/sitemap.xml): Every indexable page URL with its last-modified date.