What Are Render Elements? for Drupal 8 and Drupal 9

Last updated July 12, 2019

One of the central components of the Render API is render elements. You can think of them as prepackaged render arrays: shortcuts you can use to describe common things -- like tables, links, and form elements -- in a consistent way. In this tutorial we'll take a more in-depth look at the use of the #type property in render arrays in order to answer questions like:

  • What are render elements, and what is their use case?
  • Where can I find more information about available element types?

By the end of this tutorial you should be able to identify individual render element types within a larger render array, find the relevant documentation for specific types of render elements, and explain the use case for render elements.