Download the PHP package jmf/twig-tabs-bundle without Composer
On this page you can find all versions of the php package jmf/twig-tabs-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmf/twig-tabs-bundle
More information about jmf/twig-tabs-bundle
Files in jmf/twig-tabs-bundle
Package twig-tabs-bundle
Short Description Symfony bundle for rendering Bootstrap tabs in Twig templates.
License mit
Informations about the package twig-tabs-bundle
jmf/twig-tabs-bundle
Symfony bundle integrating jmf/twig-tabs: a Twig
tabs() / tab() API that renders tabbed content in Twig templates (defaulting to Bootstrap 5 theme).
Requirements
- PHP 8.3+
- Symfony 7.0 or 8.0
Installation
Install with Composer:
If you have Symfony Flex, the tabs() / tab()
functions are instantly available without further configuration. Otherwise, register the bundle in
config/bundles.php:
Quick Start
Use the tabs() and tab() functions in any Twig template:
Or pass an array of builders:
tab() builder methods
| Method | Description |
|---|---|
.label(string $label) |
Tab header label |
.content(string $html) |
Raw HTML content for the tab pane |
.include(string $path, array $parameters) |
Render a template as the tab pane content |
.badge(?string $badge) |
Optional badge displayed next to the label |
Configuration Reference
All settings are optional. Create config/packages/jmf_twig_tabs.yaml to override the defaults:
A sample configuration file is available in the samples/ directory.
Customising templates
The @JmfTwigTabs namespace is registered automatically and points at the Bootstrap templates
shipped by jmf/twig-tabs. To customise the markup, either set template_path to your own entry
point, or override the namespaced templates (tabs.html.twig, nav-tabs.html.twig,
nav-item.html.twig, tab-content.html.twig, tab-pane.html.twig) from your application.
License
MIT
All versions of twig-tabs-bundle with dependencies
jmf/template-rendering Version ^2.0
jmf/twig-tabs Version ^1.0
symfony/framework-bundle Version ^7.0|^8.0