Skip to main content

Quote: React

A Quote denotes a quotation or excerpt from another source, distinctively styled to stand out from the main content.

Installation​

Before you can start using the @chameleon/react component, you'll need to install it, for more information check: Getting started for developers.

With that done, you're now ready to implement the component in your application.

import { Quote } from '@chameleon/react';

export default function Example() {
return <Quote quote="Example quote" />;
}

Properties​

PropertyTypeDefaultRequiredDescription
asElementType-NoAllows rendering the component with a different HTML tag or a different custom component.
citeString-NoLink to the original source of the quote.
iconChameleonIcon | BooleanQuotesNoSpecifies the icon rendered inside the Quote.
quoteString-YesThe main content or text of the quote.
quoteeString-NoThe name of the person or entity who said or wrote the quote.
quoteeFunctionString-NoThe profession, title, or role associated with the quotee.
quoteeImageString-NoThe image of the quotee.
quotationMarksBooleantrueNoWhether or not to automatically render quotation marks around the quote.

Quotes in different languages​

Our React component adds and styles the quotation marks automatically. The styling is specified by the lang attribute in html. For example: fr adds «angle quotes» (guillemets) instead of the common "double quotes".

Automatic quotes can be turned off by setting the quotationMarks prop to false.