---
title: Mode & Appearance
slug: wip/mode-and-appearance
createdAt: 2023-07-21T06:23:05.074Z
---

# Mode & Appearance

Cosmos web components can react to a dark or light environment – called modes – by adapting their appearance.

By default, the appearance of a web component integrates into a light mode environment. A text component appears dark in a light mode environment and light in a dark mode environment.

![](https://api.archbee.com/api/optimize/Kp4perMrWxGYfa_PWfi7H/GEwWnZYOPKHz2clzWW5ev_image.png)

Even though Cosmos' web components adapt to a dark or light environment by choosing a contrasting appearance – like a *Text* renders dark in a light mode environment or light in a dark mode environment – some components behave differently.

A *Tooltip,* for example\_,\_ chooses to render dark when used in a dark mode environment and light in a light mode environment. 

![](https://api.archbee.com/api/optimize/Kp4perMrWxGYfa_PWfi7H/hY15QRm7gYESV1Slj1lSy_image.png)

## Changing the Appearance

Changing the appearance of a component can be done for individual components or a group of components at once.

Changing the appearance of a single component is as easy as utilizing its appearance property.

:::Iframe{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/a240bf27ba2153db3145cbcca5eec0fe?defaultTab=html%2Cresult&#x26;amp;editable=true&#x26;amp;theme-id=39623&#x22; height=&#x22;507px&#x22;></iframe>"}

:::

In Figma, the appearance of a component can be changed in the sidebar.

![](https://api.archbee.com/api/optimize/Kp4perMrWxGYfa_PWfi7H/tdSeaEK1SDXOx4VCKw4jp_ussbnv5rcveqrpmtclbmsq.gif)

Spinner appearance property

As mentioned earlier, the mode of an environment and the appearance of a component strongly correlate. By default, a component adapts to the mode provided by its environment. Therefore changing the appearance of components at once can be achieved by placing them in a different environment.

In code, changing the appearance of multiple components is as easy as providing a different mode to them using the [Mode](docId\:ChiCPt1WnjK11n1odNQP6) provider. If not specified differently, they'll automatically adapt their appearance to the new environment mode provided.

:::Iframe{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;></iframe>"}

:::

Unfortunately, in Figma, the appearance of multiple components can only be changed at once when they're of the same type.

![](https://api.archbee.com/api/optimize/Kp4perMrWxGYfa_PWfi7H/tAsn8IDu9KsRVt_l-rVd5_wq82eg75k1mjah3hec0e-q.gif)

In code, the appearance of a component is derived from the closest definition of a mode – modes can be nested.

Furthermore, when the appearance property of a component is used, the mode provided from its context will be ignored entirely.

:::Iframe{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;></iframe>"}

:::

