codeschubser / bootstrap-twig-components-bundle
Bootstrap Twig Components bundle for Symfony
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 2
Type:symfony-bundle
Requires
- php: >=8.2
- symfony/dependency-injection: ^6.0|^7.0
- symfony/error-handler: ^6.0|^7.0
- symfony/ux-twig-component: ^2.22
- twig/twig: ^3.8
Requires (Dev)
- matthiasnoback/symfony-dependency-injection-test: ^6.0
- nyholm/symfony-bundle-test: ^3.0
- roave/security-advisories: dev-latest
- symfony/console: ^6.0|^7.0
- symfony/framework-bundle: ^6.0|^7.0
- symfony/twig-bundle: ^6.0|^7.0
Conflicts
- symfony/config: <5.4.0
README
Warning
This Bundle is experimental and subject to change in a future release.
A Symfony bundle for the Twig Components library.
This bundle allows you to create robust and reusable Twig components.
Requirements
- PHP 8.2 or higher
- Symfony 6.0 or higher
Features
All components are Bootstrap ready. Recommend version is v5.3 or higher. Some components can be extended with icons. Bootstrap Icons and Font Awesome were tested. But other icons are also possible.
Accessibility
- Optional icons are hidden from the accessibility API.
- Alerts are decorated with
role="alert"
to send accessible alert event to assistive technology products. - Dropdowns are decorated with
aria-expanded
andaria-current
. - Icons in components are decorated with
aria-hidden
oraria-label
.
Usage
- Installation
- Components
- Alert Provide contextual feedback messages for typical user actions with a handful of available and flexible options.
- Button Provide buttons with support for multiple variants, icon, states, and more.
- Breadcrumbs Provide breadcrumb navigation with valid schema.org markup
- Card Provide flexible content containers.
- Dropdown Toggleable and contextual overlays.
- Icon Reusable icon component
- Modal TBD
- Toast TBD
Development
During development, composer provides a large number of user-specific scripts that are intended to ensure code quality, among other things. A list and the corresponding description can be called up via composer list
. These scripts are also used in the Github workflows.
Contributing
If you want to contribute to the project and make it better, your help is very welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
License
This bundle is licensed under the MIT License.