diff --git a/bootstrap4.services.yml b/bootstrap4.services.yml
new file mode 100644
index 0000000..7e7c5d0
--- /dev/null
+++ b/bootstrap4.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\bootstrap4\Hook\Bootstrap4Hooks:
+    class: Drupal\bootstrap4\Hook\Bootstrap4Hooks
+    autowire: true
diff --git a/bootstrap4.theme b/bootstrap4.theme
index 2982f93..3061c6e 100644
--- a/bootstrap4.theme
+++ b/bootstrap4.theme
@@ -5,10 +5,13 @@
  * Bootstrap4 theme file.
  */
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\bootstrap4\Hook\Bootstrap4Hooks;
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\ThemeSettingsProvider;
 use Drupal\Component\Serialization\Yaml;
 use Drupal\Core\File\FileSystemInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Render\Element;
 use Drupal\Core\Render\Element\StatusMessages;
 
 /**
@@ -18,223 +21,25 @@ use Drupal\Core\Render\Element\StatusMessages;
  * because they will be processed by Twig and drupal_render will
  * be invoked.
  */
+#[LegacyHook]
 function bootstrap4_preprocess_menu_local_tasks(&$variables) {
-  if (!empty($variables['primary'])) {
-    $variables['primary']['#attached'] = [
-      'library' => [
-        'bootstrap4/drupal.nav-tabs',
-      ],
-    ];
-  }
-  elseif (!empty($variables['secondary'])) {
-    $variables['secondary']['#attached'] = [
-      'library' => [
-        'bootstrap4/drupal.nav-tabs',
-      ],
-    ];
-  }
-
-  foreach (Element::children($variables['primary']) as $key) {
-    $variables['primary'][$key]['#level'] = 'primary';
-  }
-  foreach (Element::children($variables['secondary']) as $key) {
-    $variables['secondary'][$key]['#level'] = 'secondary';
-  }
+  \Drupal::service(Bootstrap4Hooks::class)->preprocessMenuLocalTasks($variables);
 }
 
 /**
  * Implements hook_preprocess_HOOK() for menu-local-task templates.
  */
+#[LegacyHook]
 function bootstrap4_preprocess_menu_local_task(&$variables) {
-  // Ensure is-active class is set when the tab is active. The generic active
-  // link handler applies stricter comparison rules than what is necessary for
-  // tabs.
-  if (isset($variables['is_active']) && $variables['is_active'] === TRUE) {
-    $variables['link']['#options']['attributes']['class'][] = 'active is-active';
-  }
-  else {
-    $variables['link']['#options']['attributes']['class'][] = 'nav-link';
-  }
-
-  if (isset($variables['element']['#level'])) {
-    $variables['level'] = $variables['element']['#level'];
-  }
+  \Drupal::service(Bootstrap4Hooks::class)->preprocessMenuLocalTask($variables);
 }
 
 /**
  * Implements hook_form_FORM_ID_alter().
  */
+#[LegacyHook]
 function bootstrap4_form_system_theme_settings_alter(&$form, FormStateInterface $form_state, $form_id = NULL) {
-  // Work-around for a core bug affecting admin themes. See issue #943212.
-  if (isset($form_id)) {
-    return;
-  }
-
-  $themePath = '/' . \Drupal::theme()->getActiveTheme()->getPath() . '/style-guide';
-  if (file_exists(DRUPAL_ROOT . $themePath . '/index.html')) {
-    $form['styleguide'] = [
-      '#type' => 'details',
-      '#title' => t('Style guide'),
-      '#description' => t("Style guide demonstrates abilities of bootstrap framework. Open <a  target='_blank' href='@sglink'>style guide</a> in a new window.", [
-        '@sglink' => $themePath,
-      ]),
-      '#open' => TRUE,
-    ];
-  }
-
-  $options_theme = [
-    'none' => 'do not apply theme',
-    'light' => 'light (dark text/links against a light background)',
-    'dark' => 'dark (light/white text/links against a dark background)',
-  ];
-
-  $options_colour = [
-    'none' => 'do not apply colour',
-    'primary' => 'primary',
-    'secondary' => 'secondary',
-    'light' => 'light',
-    'dark' => 'dark',
-  ];
-
-  // Populating options for top container.
-  $options_top_container = [
-    'container' => 'fixed',
-    'container-fluid m-0 p-0' => 'fluid',
-  ];
-
-  // Populating extra options for top container.
-  foreach (explode("\n", theme_get_setting('b4_top_container_config') ?? '') as $line) {
-    $values = explode("|", trim($line) ?? '');
-    if (is_array($values) && (count($values) == 2)) {
-      $options_top_container += [trim($values[0]) => trim($values[1])];
-    }
-  }
-
-  $form['body_details'] = [
-    '#type' => 'details',
-    '#title' => t('Body options'),
-    '#description' => t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override corresponding variables in scss(refer to dist/boostrap/scss/_variables.scss)"),
-    '#open' => TRUE,
-  ];
-
-  $form['body_details']['b4_top_container'] = [
-    '#type' => 'select',
-    '#title' => t('Website container type'),
-    '#default_value' => theme_get_setting('b4_top_container'),
-    '#description' => t("Type of top level container: fluid (eg edge to edge) or fixed width"),
-    '#options' => $options_top_container,
-  ];
-
-  $form['body_details']['b4_top_container_config'] = [
-    '#type' => 'textarea',
-    '#title' => t('Website container type configuration'),
-    '#default_value' => theme_get_setting('b4_top_container_config'),
-    '#description' => t("Format: <classes|label> on each line, e.g. <br><pre>container|fixed<br />container-fluid m-0 p-0|fluid</pre>"),
-  ];
-
-  $form['body_details']['b4_body_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Body theme:'),
-    '#default_value' => theme_get_setting('b4_body_schema'),
-    '#description' => t("Text colour theme of the body."),
-    '#options' => $options_theme,
-  ];
-
-  $form['body_details']['b4_body_bg_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Body background:'),
-    '#default_value' => theme_get_setting('b4_body_bg_schema'),
-    '#description' => t("Background color of the body."),
-    '#options' => $options_colour,
-  ];
-
-  $form['nav_details'] = [
-    '#type' => 'details',
-    '#title' => t('Navbar options'),
-    '#description' => t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override \$navbar-light-*/\$navbar-dark-* variables (refer to dist/boostrap/scss/_variables.scss)"),
-    '#open' => TRUE,
-  ];
-
-  $form['nav_details']['b4_navbar_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Navbar theme:'),
-    '#default_value' => theme_get_setting('b4_navbar_schema'),
-    '#description' => t("Text colour theme of the navbar."),
-    '#options' => $options_theme,
-  ];
-
-  $form['nav_details']['b4_navbar_bg_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Navbar background:'),
-    '#default_value' => theme_get_setting('b4_navbar_bg_schema'),
-    '#description' => t("Background color of the navbar."),
-    '#options' => $options_colour,
-  ];
-
-  $form['footer_details'] = [
-    '#type' => 'details',
-    '#title' => t('Footer options'),
-    '#description' => t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override corresponding variables in scss (refer to dist/boostrap/scss/_variables.scss)"),
-    '#open' => TRUE,
-  ];
-
-  $form['footer_details']['b4_footer_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Footer theme:'),
-    '#default_value' => theme_get_setting('b4_footer_schema'),
-    '#description' => t("Text colour theme of the footer."),
-    '#options' => $options_theme,
-  ];
-
-  $form['footer_details']['b4_footer_bg_schema'] = [
-    '#type' => 'select',
-    '#title' => t('Footer background:'),
-    '#default_value' => theme_get_setting('b4_footer_bg_schema'),
-    '#description' => t("Background color of the footer."),
-    '#options' => $options_colour,
-  ];
-
-  $form['subtheme'] = [
-    '#type' => 'details',
-    '#title' => t('Subtheme'),
-    '#description' => t("Create subtheme."),
-    '#open' => FALSE,
-  ];
-
-  $form['subtheme']['subtheme_folder'] = [
-    '#type' => 'textfield',
-    '#title' => t('Subtheme location'),
-    '#default_value' => 'themes/custom',
-    '#description' => t("Relative path to the webroot <em>%root</em>. No trailing slash.", [
-      '%root' => DRUPAL_ROOT,
-    ]),
-  ];
-
-  $form['subtheme']['subtheme_name'] = [
-    '#type' => 'textfield',
-    '#title' => t('Subtheme name'),
-    '#default_value' => 'B4 subtheme',
-    '#description' => t("If name is empty, machine name will be used."),
-  ];
-
-  $form['subtheme']['subtheme_machine_name'] = [
-    '#type' => 'textfield',
-    '#title' => t('Subtheme machine name'),
-    '#default_value' => 'b4subtheme',
-    '#description' => t("Use lowercase characters, numbers and underscores. Name must start with a letter."),
-  ];
-
-  $form['subtheme']['create'] = [
-    '#type' => 'submit',
-    '#name' => 'subtheme_create',
-    '#value' => t('Create'),
-    '#button_type' => 'danger',
-    '#attributes' => [
-      'class' => ['btn btn-danger'],
-    ],
-    '#submit' => ['bootstrap4_form_system_theme_settings_subtheme_submit'],
-    '#validate' => ['bootstrap4_form_system_theme_settings_subtheme_validate'],
-  ];
+  \Drupal::service(Bootstrap4Hooks::class)->formSystemThemeSettingsAlter($form, $form_state, $form_id);
 }
 
 /**
@@ -447,24 +252,23 @@ function bootstrap4_form_system_theme_settings_subtheme_submit($form, FormStateI
  */
 function bootstrap4_preprocess_page(&$variables) {
   // Pass variables to theme.
-  $variables['b4_top_container'] = theme_get_setting('b4_top_container');
+  $variables['b4_top_container'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_top_container'), fn() => theme_get_setting('b4_top_container'));
   // Navbar colour theme.
-  $variables['b4_navbar_schema'] = theme_get_setting('b4_navbar_schema');
-  $variables['b4_navbar_bg_schema'] = theme_get_setting('b4_navbar_bg_schema');
+  $variables['b4_navbar_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_navbar_schema'), fn() => theme_get_setting('b4_navbar_schema'));
+  $variables['b4_navbar_bg_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_navbar_bg_schema'), fn() => theme_get_setting('b4_navbar_bg_schema'));
   // Footer colour theme.
-  $variables['b4_footer_schema'] = theme_get_setting('b4_footer_schema');
-  $variables['b4_footer_bg_schema'] = theme_get_setting('b4_footer_bg_schema');
+  $variables['b4_footer_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_footer_schema'), fn() => theme_get_setting('b4_footer_schema'));
+  $variables['b4_footer_bg_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_footer_bg_schema'), fn() => theme_get_setting('b4_footer_bg_schema'));
 
 }
 
 /**
  * Implements hook_theme_suggestions_HOOK_alter().
  */
+#[LegacyHook]
 function bootstrap4_theme_suggestions_page_alter(array &$suggestions, array $variables) {
 
-  if (isset($_GET['styleguide'])) {
-    $suggestions[] = 'page__styleguide';
-  }
+  \Drupal::service(Bootstrap4Hooks::class)->themeSuggestionsPageAlter($suggestions, $variables);
 }
 
 /**
@@ -486,8 +290,8 @@ function bootstrap4_preprocess_datetime_form(&$variables) {
  */
 function bootstrap4_preprocess_html(&$variables) {
   // Body colour theme.
-  $variables['b4_body_schema'] = theme_get_setting('b4_body_schema');
-  $variables['b4_body_bg_schema'] = theme_get_setting('b4_body_bg_schema');
+  $variables['b4_body_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_body_schema'), fn() => theme_get_setting('b4_body_schema'));
+  $variables['b4_body_bg_schema'] = DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_body_bg_schema'), fn() => theme_get_setting('b4_body_bg_schema'));
 }
 
 /**
diff --git a/src/Hook/Bootstrap4Hooks.php b/src/Hook/Bootstrap4Hooks.php
new file mode 100644
index 0000000..fe5d4b6
--- /dev/null
+++ b/src/Hook/Bootstrap4Hooks.php
@@ -0,0 +1,242 @@
+<?php
+
+namespace Drupal\bootstrap4\Hook;
+
+use Drupal\Core\Extension\ThemeSettingsProvider;
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Render\Element;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+
+/**
+ * Hook implementations for bootstrap4.
+ */
+class Bootstrap4Hooks {
+  use StringTranslationTrait;
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu-local-tasks templates.
+   *
+   * Use preprocess hook to set #attached to child elements
+   * because they will be processed by Twig and drupal_render will
+   * be invoked.
+   */
+  #[Hook('preprocess_menu_local_tasks')]
+  public function preprocessMenuLocalTasks(&$variables) {
+    if (!empty($variables['primary'])) {
+      $variables['primary']['#attached'] = [
+        'library' => [
+          'bootstrap4/drupal.nav-tabs',
+        ],
+      ];
+    }
+    elseif (!empty($variables['secondary'])) {
+      $variables['secondary']['#attached'] = [
+        'library' => [
+          'bootstrap4/drupal.nav-tabs',
+        ],
+      ];
+    }
+    foreach (Element::children($variables['primary']) as $key) {
+      $variables['primary'][$key]['#level'] = 'primary';
+    }
+    foreach (Element::children($variables['secondary']) as $key) {
+      $variables['secondary'][$key]['#level'] = 'secondary';
+    }
+  }
+
+  /**
+   * Implements hook_preprocess_HOOK() for menu-local-task templates.
+   */
+  #[Hook('preprocess_menu_local_task')]
+  public function preprocessMenuLocalTask(&$variables) {
+    // Ensure is-active class is set when the tab is active. The generic active
+    // link handler applies stricter comparison rules than what is necessary for
+    // tabs.
+    if (isset($variables['is_active']) && $variables['is_active'] === TRUE) {
+      $variables['link']['#options']['attributes']['class'][] = 'active is-active';
+    }
+    else {
+      $variables['link']['#options']['attributes']['class'][] = 'nav-link';
+    }
+    if (isset($variables['element']['#level'])) {
+      $variables['level'] = $variables['element']['#level'];
+    }
+  }
+
+  /**
+   * Implements hook_form_FORM_ID_alter().
+   */
+  #[Hook('form_system_theme_settings_alter')]
+  public function formSystemThemeSettingsAlter(&$form, FormStateInterface $form_state, $form_id = NULL) {
+    // Work-around for a core bug affecting admin themes. See issue #943212.
+    if (isset($form_id)) {
+      return;
+    }
+    $themePath = '/' . \Drupal::theme()->getActiveTheme()->getPath() . '/style-guide';
+    if (file_exists(DRUPAL_ROOT . $themePath . '/index.html')) {
+      $form['styleguide'] = [
+        '#type' => 'details',
+        '#title' => $this->t('Style guide'),
+        '#description' => $this->t("Style guide demonstrates abilities of bootstrap framework. Open <a  target='_blank' href='@sglink'>style guide</a> in a new window.", [
+          '@sglink' => $themePath,
+        ]),
+        '#open' => TRUE,
+      ];
+    }
+    $options_theme = [
+      'none' => 'do not apply theme',
+      'light' => 'light (dark text/links against a light background)',
+      'dark' => 'dark (light/white text/links against a dark background)',
+    ];
+    $options_colour = [
+      'none' => 'do not apply colour',
+      'primary' => 'primary',
+      'secondary' => 'secondary',
+      'light' => 'light',
+      'dark' => 'dark',
+    ];
+    // Populating options for top container.
+    $options_top_container = [
+      'container' => 'fixed',
+      'container-fluid m-0 p-0' => 'fluid',
+    ];
+    // Populating extra options for top container.
+    foreach (explode("\n", DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_top_container_config'), fn() => theme_get_setting('b4_top_container_config')) ?? '') as $line) {
+      $values = explode("|", trim($line) ?? '');
+      if (is_array($values) && count($values) == 2) {
+        $options_top_container += [
+          trim($values[0]) => trim($values[1]),
+        ];
+      }
+    }
+    $form['body_details'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Body options'),
+      '#description' => $this->t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override corresponding variables in scss(refer to dist/boostrap/scss/_variables.scss)"),
+      '#open' => TRUE,
+    ];
+    $form['body_details']['b4_top_container'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Website container type'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_top_container'), fn() => theme_get_setting('b4_top_container')),
+      '#description' => $this->t("Type of top level container: fluid (eg edge to edge) or fixed width"),
+      '#options' => $options_top_container,
+    ];
+    $form['body_details']['b4_top_container_config'] = [
+      '#type' => 'textarea',
+      '#title' => $this->t('Website container type configuration'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_top_container_config'), fn() => theme_get_setting('b4_top_container_config')),
+      '#description' => $this->t("Format: <classes|label> on each line, e.g. <br><pre>container|fixed<br />container-fluid m-0 p-0|fluid</pre>"),
+    ];
+    $form['body_details']['b4_body_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Body theme:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_body_schema'), fn() => theme_get_setting('b4_body_schema')),
+      '#description' => $this->t("Text colour theme of the body."),
+      '#options' => $options_theme,
+    ];
+    $form['body_details']['b4_body_bg_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Body background:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_body_bg_schema'), fn() => theme_get_setting('b4_body_bg_schema')),
+      '#description' => $this->t("Background color of the body."),
+      '#options' => $options_colour,
+    ];
+    $form['nav_details'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Navbar options'),
+      '#description' => $this->t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override \$navbar-light-*/\$navbar-dark-* variables (refer to dist/boostrap/scss/_variables.scss)"),
+      '#open' => TRUE,
+    ];
+    $form['nav_details']['b4_navbar_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Navbar theme:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_navbar_schema'), fn() => theme_get_setting('b4_navbar_schema')),
+      '#description' => $this->t("Text colour theme of the navbar."),
+      '#options' => $options_theme,
+    ];
+    $form['nav_details']['b4_navbar_bg_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Navbar background:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_navbar_bg_schema'), fn() => theme_get_setting('b4_navbar_bg_schema')),
+      '#description' => $this->t("Background color of the navbar."),
+      '#options' => $options_colour,
+    ];
+    $form['footer_details'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Footer options'),
+      '#description' => $this->t("Combination of theme/background colour may affect background colour/text colour contrast. To fix any contrast issues, override corresponding variables in scss (refer to dist/boostrap/scss/_variables.scss)"),
+      '#open' => TRUE,
+    ];
+    $form['footer_details']['b4_footer_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Footer theme:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_footer_schema'), fn() => theme_get_setting('b4_footer_schema')),
+      '#description' => $this->t("Text colour theme of the footer."),
+      '#options' => $options_theme,
+    ];
+    $form['footer_details']['b4_footer_bg_schema'] = [
+      '#type' => 'select',
+      '#title' => $this->t('Footer background:'),
+      '#default_value' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.3.0', fn() => \Drupal::service(ThemeSettingsProvider::class)->getSetting('b4_footer_bg_schema'), fn() => theme_get_setting('b4_footer_bg_schema')),
+      '#description' => $this->t("Background color of the footer."),
+      '#options' => $options_colour,
+    ];
+    $form['subtheme'] = [
+      '#type' => 'details',
+      '#title' => $this->t('Subtheme'),
+      '#description' => $this->t("Create subtheme."),
+      '#open' => FALSE,
+    ];
+    $form['subtheme']['subtheme_folder'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Subtheme location'),
+      '#default_value' => 'themes/custom',
+      '#description' => $this->t("Relative path to the webroot <em>%root</em>. No trailing slash.", [
+        '%root' => DRUPAL_ROOT,
+      ]),
+    ];
+    $form['subtheme']['subtheme_name'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Subtheme name'),
+      '#default_value' => 'B4 subtheme',
+      '#description' => $this->t("If name is empty, machine name will be used."),
+    ];
+    $form['subtheme']['subtheme_machine_name'] = [
+      '#type' => 'textfield',
+      '#title' => $this->t('Subtheme machine name'),
+      '#default_value' => 'b4subtheme',
+      '#description' => $this->t("Use lowercase characters, numbers and underscores. Name must start with a letter."),
+    ];
+    $form['subtheme']['create'] = [
+      '#type' => 'submit',
+      '#name' => 'subtheme_create',
+      '#value' => $this->t('Create'),
+      '#button_type' => 'danger',
+      '#attributes' => [
+        'class' => [
+          'btn btn-danger',
+        ],
+      ],
+      '#submit' => [
+        'bootstrap4_form_system_theme_settings_subtheme_submit',
+      ],
+      '#validate' => [
+        'bootstrap4_form_system_theme_settings_subtheme_validate',
+      ],
+    ];
+  }
+
+  /**
+   * Implements hook_theme_suggestions_HOOK_alter().
+   */
+  #[Hook('theme_suggestions_page_alter')]
+  public function themeSuggestionsPageAlter(array &$suggestions, array $variables) {
+    if (isset($_GET['styleguide'])) {
+      $suggestions[] = 'page__styleguide';
+    }
+  }
+
+}
