Skip to content

Quote - Web Component โ€‹

Browser support โ€‹

Detected engine: ย 

  • Chromium

  • Webkit

  • Gecko

Parameters โ€‹

The Web component uses the <z-quote> tag:

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

NameTypeDescription
contentstringThe quote content
quote-srcstringThe source of the quote
author-namestringThe name of the author
descriptionstringThe description of the quote
image-srcstringThe image source of the quote

The available slots for the component are:

NameTagsDescription
defaultspan

quote-src โ€‹

The quote-src attribute is used to set the source of the quote.

To be or not to be

author-name โ€‹

The author-name attribute is used to set the name of the author.

To be or not to be

description โ€‹

The description attribute is used to set the description of the quote.

To be or not to be

image-src โ€‹

The image-src attribute is used to set the image of the author.

You can also use the images from the Zurich media images. Make sure you specify correctly the name of the image you want to display.

To be or not to be


You can customize the quote component using the --z-quote--bg and --z-quote--color CSS variables to change the background and text color, respectively.

To be or not to be

Playground โ€‹

Customization โ€‹

HTML Examples โ€‹

Imports
html
<link rel="stylesheet" href="/0.4.5/@zurich/web-components/styles.css" />
<script type="module" src="/0.4.5/@zurich/web-components/quote.js"></script>
Code
html
<z-quote author-name="John Doe" description="Description" image-src="../sample.png">
  Lorem ipsum dolor sit amet. Quo rerum dolorem ut velit exercitationem id aperiam omnis vel
</z-quote>