Skip to content

Components Overview

Shea Lewis edited this page Jun 24, 2015 · 3 revisions

Components are an easy and convenient means to creating reusable sections of your theme. Every theme may have their own set of components to tackle common UI elements, such as page headers, panels, modals, etc.

The purpose behind Theme Components are to increase readability within your view files, and cut away repeated code. Making your themes easier to maintain and make changes in the future without having to dig through countless view files. Once a component is registered, the usage is simple from within your view file to display the results:

Blade:

@component_componentname('Data may be passed through as well.')

Twig:

{{ component_componentname('Data may be passed through as well.') }}

To find our more about this process, head on over to the Registering & Use Components page.