Skip to content

How to use these docs

Start with Basics if you have not built a Magewire component yet. The guide gives you the PHP class, PHTML template, and Magento layout XML you need to see an update in the browser. From there, Components shows how to reuse the same class on more than one page.

Magewire 3 shares concepts with Livewire 3, but runs in Magento. Every guide here aims to show the Magento files and the code you can put in them. Links to Livewire 3 are additional detail for features that Magewire actually registers.

Choose a path

You want to… Start here
Build an interactive storefront block Components, then Properties and Actions
Build a form wire:model and wire:submit
Keep one class reusable across pages Layout arguments and Best practices
Integrate a theme Theming and Compatibility module
Add Magewire to the backend Admin installation and Building admin components
Move a V1 component to V3 Upgrade and Backwards compatibility

Use with an AI assistant

Give your assistant llms.txt as a starting point. It lists the documentation by topic and links to the published guides. For a task spanning many guides, use llms-full.txt, which contains the complete navigated documentation in one file. The full file may be too large for your assistant's context window.

These resources are manually refreshed snapshots for Magewire 3.x. Check the refresh date in each file and consult the linked guides for changes since then. Review generated code against the relevant guide, especially where Magewire differs from Livewire.

What "supported" means

The Magewire source contains ported Livewire classes that are not necessarily active. Check the Magewire component API, area-specific feature registrations, and companion packages before copying a Livewire example. For instance, Livewire form objects and its validation feature are not registered in the current Magewire runtime, even though similarly named code exists in the source tree. Use a Magento service for validation and persistence.

When a guide describes an integration, install the package named on that page. The Hyvä theme, Hyvä Checkout compatibility, and admin area each have their own packages. A storefront example also needs the theme integration used by your store.

Contribute an example

A useful documentation example includes the component class, its template, the layout binding, and any required module or theme setup. Show escaped PHTML output and an authorization check for public actions that change data. If a page is unclear or wrong, contribute a correction with the Magewire version and a source or test that demonstrates the behavior.