---
title: Examples
slug: wip/-5Mk-examples
createdAt: 2023-08-09T06:53:55.209Z
---

# Examples

To switch the mode of an individual component or a group, add the component as a child to the Mode Provider.

:::Iframe{iframeHeight="0" code="<iframe title=&#x22;Embeded content from codepen.io&#x22; class=&#x22;no-border max-full-width full-height flex-grow&#x22; src=&#x22;https://codepen.io/redbulldesign/embed/4920641450cf2c902d47237a7be082ee?defaultTab=html%2Cresult&#x26;amp;editable=true&#x26;amp;theme-id=39623&#x22; height=&#x22;190px&#x22; loading=&#x22;lazy&#x22;></iframe>"}

:::

With the Mode component, the appearance of descendent components can be switched regardless of their nested level of depth.

:::Iframe{iframeHeight="0" code="<iframe title=&#x22;Embeded content from codepen.io&#x22; class=&#x22;no-border max-full-width full-height flex-grow&#x22; src=&#x22;https://codepen.io/redbulldesign/embed/c81e142f4712e5cc0b6391d237231c0d?defaultTab=html%2Cresult&#x26;amp;editable=true&#x26;amp;theme-id=39623&#x22; height=&#x22;341px&#x22; loading=&#x22;lazy&#x22;></iframe>"}

:::

Mode Providers can be nested – the one that is closest to a component is the one that provides the mode.

:::Iframe{iframeHeight="0" code="<iframe title=&#x22;Embeded content from codepen.io&#x22; class=&#x22;no-border max-full-width full-height flex-grow&#x22; src=&#x22;https://codepen.io/redbulldesign/embed/791e80061b80b343a32e8f7d0804e075?defaultTab=html%2Cresult&#x26;amp;editable=true&#x26;amp;theme-id=39623&#x22; height=&#x22;385px&#x22; loading=&#x22;lazy&#x22;></iframe>"}

:::

