Download the PHP package plixus/twig-component-preview-bundle without Composer

On this page you can find all versions of the php package plixus/twig-component-preview-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twig-component-preview-bundle

PlixusTwigComponentPreviewBundle

A Symfony bundle that automatically generates live preview interfaces for your Twig Components. Change form values and see your components update in real-time without page reloads.

🎯 What This Bundle Does

🚀 Installation

Requirements:

⚡ Quick Start (5 Minutes)

Step 1: Create Your Component

First, create a regular Twig Component and mark it for preview with attributes:

Step 2: Create the Controller

Important: You need to manually map component names to classes - the bundle doesn't auto-discover them for security reasons:

Step 3: Create the Template

Step 4: Visit Your Preview

Navigate to: https://yourdomain.com/preview/alert

That's it! You now have a live preview interface where you can:

📝 Component Configuration

Available Property Types

Configure your component properties with the #[PreviewProperty] attribute:

Property Attribute Options

🎨 Syntax Configuration

The bundle supports both Twig Component syntax styles. You can configure which syntax to show in the code examples:

Option 1: Configure Syntax Preference

Function Syntax (default):

HTML Syntax:

Option 2: Show Both Syntax Styles

This will display tabs showing both syntax styles so users can choose their preference.

⚙️ Advanced Configuration

Component Options

Layout Options

🎨 Template Customization

Override Bundle Templates

Create a template in your app to override the bundle's default:

Partial Template Overrides

Override specific parts by extending the original template:

🎨 CSS Customization

CSS Variables

Override CSS variables to customize the appearance:

Custom CSS Classes

Add your own styling:

🎯 Common Use Cases

1. Documentation Site

2. Design System Preview

3. Developer Testing

4. Component Library Index

Create an overview of all your components:

🔧 Troubleshooting

Common Issues

"Component not found" Error

"Expected argument of type bool, null given"

Live updates not working

Styling issues

Bundle Requirements Check

📦 What's Next?

This bundle is perfect for:

🤝 Contributing

Found a bug or have a feature request? Please open an issue on GitHub.

📄 License

This bundle is released under the MIT License.


All versions of twig-component-preview-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/framework-bundle Version ^6.4|^7.0
symfony/twig-bundle Version ^6.4|^7.0
symfony/ux-twig-component Version ^2.8
symfony/ux-live-component Version ^2.8
symfony/stimulus-bundle Version ^2.0
symfony/asset-mapper Version ^6.4|^7.0
symfony/asset Version ^6.4|^7.0
symfony/form Version ^6.4|^7.0
symfony/validator Version ^6.4|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plixus/twig-component-preview-bundle contains the following files

Loading the files please wait ...