=head1 NAME Reaction::Manual::Widgets - Creating and extending Reaction Widgets =head1 WHAT IS A WIDGET A widget represents the Perl code used by the layout. Which widget to use can be set with the C<=widget> directive. For more on templates, look at L. The widget that is used defaults to a name built by the controller class and the name of the action. E.g. the action Cbar> would assume a widget named C and look for it in the C defined in the C or the C. =head1 A SIMPLE WIDGET The simplest widget would be this: package MyApp::Widget::Foo; use Reaction::UI::WidgetClass; use namespace::autoclean; __PACKAGE__->meta->make_immutable; 1; The use of L will import L, L, L and L. It will also set L as the base class of the widget. If you want to extend an existing widget rather than create a new one, use L. =head1 FRAGMENTS Layouts can use the C<=for layout $fragment> POD syntax to define fragments and use them like usual L