Skip to content

SocialMediaIcon - Web Component โ€‹

The SocialMediaIcon component can be used imported from:

Playground โ€‹

Parameters โ€‹

INFO

The web component version of the icon doesn't require to import th icons from @zurich/design-tokens.

The Web component uses the <z-social-media-icon> tag:

By default, all the parameters are optional or can be set in different, except for the ones marked as required

The parametrization of the component can be done with the following custom HTML params:

NameTypeDescriptionSlotA11y
brandstring
configstring

Parameters use โ€‹

brand โ€‹

It's the brand of the social media that is going to be shown:

config โ€‹

The config attribute is an optional parameter that can be used to set the size and color of the icon.

The pattern would be: <?style><?:size>.

size โ€‹

The first modifier is size and this attribute can receive the values xs, s, m or l. The default size is m. Check the size section. This attribute uses the --z-social-media-icon--size CSS custom property to set the size of the icon.

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

HTML Examples โ€‹

CodeSandbox example โ€‹