diff --git a/core/modules/toolbar/src/Element/Toolbar.php b/core/modules/toolbar/src/Element/Toolbar.php
new file mode 100644
index 0000000..bfd4fef
--- /dev/null
+++ b/core/modules/toolbar/src/Element/Toolbar.php
@@ -0,0 +1,106 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\toolbar\Element\Toolbar.
+ */
+
+namespace Drupal\toolbar\Element;
+
+use Drupal\Core\Render\Element\RenderElement;
+
+/**
+ * Provides a render element for the default Drupal toolbar.
+ *
+ * @RenderElement("toolbar")
+ */
+class Toolbar extends RenderElement {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getInfo() {
+    $class = get_class($this);
+    return array(
+      '#pre_render' => array(
+        array($class, 'preRenderToolbar'),
+      ),
+      '#theme' => 'toolbar',
+      '#attached' => array(
+        'library' => array(
+          'toolbar/toolbar',
+        ),
+      ),
+      // Metadata for the toolbar wrapping element.
+      '#attributes' => array(
+        // The id cannot be simply "toolbar" or it will clash with the simpletest
+        // tests listing which produces a checkbox with attribute id="toolbar"
+        'id' => 'toolbar-administration',
+        'class' => array('toolbar'),
+        'role' => 'group',
+        'aria-label' => $this->t('Site administration toolbar'),
+      ),
+      // Metadata for the administration bar.
+      '#bar' => array(
+        '#heading' => $this->t('Toolbar items'),
+        '#attributes' => array(
+          'id' => 'toolbar-bar',
+          'class' => array('toolbar-bar', 'clearfix',),
+          'role' => 'navigation',
+          'aria-label' => $this->t('Toolbar items'),
+        ),
+      ),
+    );
+  }
+
+  /**
+   * Builds the Toolbar as a structured array ready for drupal_render().
+   *
+   * Since building the toolbar takes some time, it is done just prior to
+   * rendering to ensure that it is built only if it will be displayed.
+   *
+   * @param array $element
+   *  A renderable array.
+   *
+   * @return array
+   *  A renderable array.
+   *
+   * @see toolbar_page_build().
+   */
+  public static function preRenderToolbar($element) {
+    // Get the configured breakpoints to switch from vertical to horizontal
+    // toolbar presentation.
+    $breakpoints = \Drupal::service('breakpoint.manager')->getBreakpointsByGroup('toolbar');
+    if (!empty($breakpoints)) {
+      $media_queries =  array();
+      foreach ($breakpoints as $id => $breakpoint) {
+        $media_queries[$id] = $breakpoint->getMediaQuery();
+      }
+
+      $element['#attached']['js'][] = array(
+        'data' => array(
+          'toolbar' => array(
+            'breakpoints' => $media_queries,
+          )
+        ),
+        'type' => 'setting',
+      );
+    }
+
+    // Get toolbar items from all modules that implement hook_toolbar().
+    $items = \Drupal::moduleHandler()->invokeAll('toolbar');
+    // Allow for altering of hook_toolbar().
+    \Drupal::moduleHandler()->alter('toolbar', $items);
+    // Sort the children.
+    uasort($items, array('\Drupal\Component\Utility\SortArray', 'sortByWeightProperty'));
+
+    // Merge in the original toolbar values.
+    $element = array_merge($element, $items);
+
+    // Render the children.
+    $element['#children'] = drupal_render_children($element);
+
+    return $element;
+  }
+
+}
diff --git a/core/modules/toolbar/src/Element/ToolbarItem.php b/core/modules/toolbar/src/Element/ToolbarItem.php
new file mode 100644
index 0000000..f67c5ab
--- /dev/null
+++ b/core/modules/toolbar/src/Element/ToolbarItem.php
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\toolbar\Element\ToolbarItem.
+ */
+
+namespace Drupal\toolbar\Element;
+
+use Drupal\Core\Render\Element\RenderElement;
+
+/**
+ * Provides a toolbar item that is wrapped in markup for common styling.
+ *
+ * The 'tray' property contains a renderable array.
+ *
+ * @RenderElement("toolbar_item")
+ */
+class ToolbarItem extends RenderElement {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getInfo() {
+    $class = get_class($this);
+    return array(
+      '#pre_render' => array(
+        array($class, 'preRenderToolbarItem'),
+      ),
+      '#theme' => 'toolbar_item',
+      'tab' => array(
+        '#type' => 'link',
+        '#title' => NULL,
+        '#href' => '',
+      ),
+    );
+  }
+
+  /**
+   * Provides markup for associating a tray trigger with a tray element.
+   *
+   * A tray is a responsive container that wraps renderable content. Trays present
+   * content well on small and large screens alike.
+   *
+   * @param array $element
+   *   A renderable array.
+   *
+   * @return array
+   *   A renderable array.
+   */
+  public static function preRenderToolbarItem($element) {
+    // Assign each item a unique ID.
+    $id = drupal_html_id('toolbar-item');
+
+    // Provide attributes for a toolbar item.
+    $attributes = array(
+      'id' => $id,
+    );
+
+    // If tray content is present, markup the tray and its associated trigger.
+    if (!empty($element['tray'])) {
+      // Provide attributes necessary for trays.
+      $attributes += array(
+        'data-toolbar-tray' => $id . '-tray',
+        'aria-owns' => $id,
+        'role' => 'button',
+        'aria-pressed' => 'false',
+      );
+
+      // Merge in module-provided attributes.
+      $element['tab'] += array('#attributes' => array());
+      $element['tab']['#attributes'] += $attributes;
+      $element['tab']['#attributes']['class'][] = 'trigger';
+
+      // Provide attributes for the tray theme wrapper.
+      $attributes = array(
+        'id' => $id . '-tray',
+        'data-toolbar-tray' => $id . '-tray',
+        'aria-owned-by' => $id,
+      );
+      // Merge in module-provided attributes.
+      if (!isset($element['tray']['#wrapper_attributes'])) {
+        $element['tray']['#wrapper_attributes'] = array();
+      }
+      $element['tray']['#wrapper_attributes'] += $attributes;
+      $element['tray']['#wrapper_attributes']['class'][] = 'toolbar-tray';
+    }
+
+    $element['tab']['#attributes']['class'][] = 'toolbar-item';
+
+    return $element;
+  }
+
+}
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index 788378c..a6ccfc0 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -60,55 +60,6 @@ function toolbar_theme($existing, $type, $theme, $path) {
 }
 
 /**
- * Implements hook_element_info().
- */
-function toolbar_element_info() {
-  $elements = array();
-
-  $elements['toolbar'] = array(
-    '#pre_render' => array('toolbar_pre_render'),
-    '#theme' => 'toolbar',
-    '#attached' => array(
-      'library' => array(
-        'toolbar/toolbar',
-      ),
-    ),
-    // Metadata for the toolbar wrapping element.
-    '#attributes' => array(
-      // The id cannot be simply "toolbar" or it will clash with the simpletest
-      // tests listing which produces a checkbox with attribute id="toolbar"
-      'id' => 'toolbar-administration',
-      'class' => array('toolbar'),
-      'role' => 'group',
-      'aria-label' => t('Site administration toolbar'),
-    ),
-    // Metadata for the administration bar.
-    '#bar' => array(
-      '#heading' => t('Toolbar items'),
-      '#attributes' => array(
-        'id' => 'toolbar-bar',
-        'class' => array('toolbar-bar', 'clearfix',),
-        'role' => 'navigation',
-        'aria-label' => t('Toolbar items'),
-      ),
-    ),
-  );
-
-  // A toolbar item is wrapped in markup for common styling.  The 'tray'
-  // property contains a renderable array.
-  $elements['toolbar_item'] = array(
-    '#pre_render' => array('toolbar_pre_render_item'),
-    '#theme' => 'toolbar_item',
-    'tab' => array(
-      '#type' => 'link',
-      '#title' => NULL,
-      '#href' => '',
-    ),
-  );
-  return $elements;
-}
-
-/**
  * Use Drupal's page cache for toolbar/subtrees/*, even for authenticated users.
  *
  * This gets invoked after full bootstrap, so must duplicate some of what's
@@ -158,57 +109,6 @@ function toolbar_page_build(&$page) {
 }
 
 /**
- * Builds the Toolbar as a structured array ready for drupal_render().
- *
- * Since building the toolbar takes some time, it is done just prior to
- * rendering to ensure that it is built only if it will be displayed.
- *
- * @param array $element
- *  A renderable array.
- *
- * @return
- *  A renderable array.
- *
- * @see toolbar_page_build().
- */
-function toolbar_pre_render($element) {
-
-  // Get the configured breakpoints to switch from vertical to horizontal
-  // toolbar presentation.
-  $breakpoints = \Drupal::service('breakpoint.manager')->getBreakpointsByGroup('toolbar');
-  if (!empty($breakpoints)) {
-    $media_queries =  array();
-    foreach ($breakpoints as $id => $breakpoint) {
-      $media_queries[$id] = $breakpoint->getMediaQuery();
-    }
-
-    $element['#attached']['js'][] = array(
-      'data' => array(
-        'toolbar' => array(
-          'breakpoints' => $media_queries,
-        )
-      ),
-      'type' => 'setting',
-    );
-  }
-
-  // Get toolbar items from all modules that implement hook_toolbar().
-  $items = \Drupal::moduleHandler()->invokeAll('toolbar');
-  // Allow for altering of hook_toolbar().
-  \Drupal::moduleHandler()->alter('toolbar', $items);
-  // Sort the children.
-  uasort($items, array('\Drupal\Component\Utility\SortArray', 'sortByWeightProperty'));
-
-  // Merge in the original toolbar values.
-  $element = array_merge($element, $items);
-
-  // Render the children.
-  $element['#children'] = drupal_render_children($element);
-
-  return $element;
-}
-
-/**
  * Prepares variables for administration toolbar templates.
  *
  * Default template: toolbar.html.twig.
@@ -269,61 +169,6 @@ function template_preprocess_toolbar(&$variables) {
 }
 
 /**
- * Provides markup for associating a tray trigger with a tray element.
- *
- * A tray is a responsive container that wraps renderable content. Trays present
- * content well on small and large screens alike.
- *
- * @param array $element
- *   A renderable array.
- *
- * @return
- *   A renderable array.
- */
-function toolbar_pre_render_item($element) {
-  // Assign each item a unique ID.
-  $id = drupal_html_id('toolbar-item');
-
-  // Provide attributes for a toolbar item.
-  $attributes = array(
-    'id' => $id,
-  );
-
-  // If tray content is present, markup the tray and its associated trigger.
-  if (!empty($element['tray'])) {
-    // Provide attributes necessary for trays.
-    $attributes += array(
-      'data-toolbar-tray' => $id . '-tray',
-      'aria-owns' => $id,
-      'role' => 'button',
-      'aria-pressed' => 'false',
-    );
-
-    // Merge in module-provided attributes.
-    $element['tab'] += array('#attributes' => array());
-    $element['tab']['#attributes'] += $attributes;
-    $element['tab']['#attributes']['class'][] = 'trigger';
-
-    // Provide attributes for the tray theme wrapper.
-    $attributes = array(
-      'id' => $id . '-tray',
-      'data-toolbar-tray' => $id . '-tray',
-      'aria-owned-by' => $id,
-    );
-    // Merge in module-provided attributes.
-    if (!isset($element['tray']['#wrapper_attributes'])) {
-      $element['tray']['#wrapper_attributes'] = array();
-    }
-    $element['tray']['#wrapper_attributes'] += $attributes;
-    $element['tray']['#wrapper_attributes']['class'][] = 'toolbar-tray';
-  }
-
-  $element['tab']['#attributes']['class'][] = 'toolbar-item';
-
-  return $element;
-}
-
-/**
  * Implements hook_toolbar().
  */
 function toolbar_toolbar() {
