Skip to content

Quote - Web Component

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

Parameters

The Web component uses the <z-quote> 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:

NameTypeDescriptionSlot
contentstringThe quote contentdefault
quote-srcstringThe source of the quote
author-namestringThe name of the authorauthor-name
descriptionstringThe description of the quotedescription
image-srcstringThe image source of the quote

The available slots for the component are:

NameTagsDescription
defaultspanThe quote content
author-namespanThe name of the author
descriptionspanThe description of the quote

content

The content attribute is inject the main quote.

Or using the default slot:

To be or not to be

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

Or using the author-name slot:

Prince Hamlet 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

Or using the description slot:

The famous quote from Hamlet 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

StackBlitz example