Themes and styling

Apply a shared theme and adjust design tokens within the required scope.

Light and dark themes#

On the element wrapping your components, set sy-theme and a theme class. Apply them to the whole page or a specific region.

Light

sy-theme-light
PrimaryDefaultDisabled

Dark

sy-theme-dark
PrimaryDefaultDisabled

Live examples of the same Button with different themes. These examples keep their own themes when you switch the site theme.

HTML
<section class="sy-theme sy-theme-light">
  <sy-button variant="primary">Primary</sy-button>
  <sy-button>Default</sy-button>
  <sy-button disabled>Disabled</sy-button>
</section>

<section class="sy-theme sy-theme-dark">
  <sy-button variant="primary">Primary</sy-button>
  <sy-button>Default</sy-button>
  <sy-button disabled>Disabled</sy-button>
</section>