Blockquote

Sets off a quotation from the text around it, with an optional source.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.

Usage

Code
import { Blockquote } from '@leverui/components';
Code
<Blockquote.Root>
  <Blockquote.Content cite="https://" />
  <Blockquote.Caption>
    <cite>Wren Ashford</cite>
  </Blockquote.Caption>
</Blockquote.Root>

For one ready-made component, see the snippet below.

Examples

With Cite

To provide reference about the blockquote, pass the cite prop to Blockquote.Content pointing to the quote url, and render the Blockquote.Caption component to display name of quote author.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

Colors

Use the colorPalette prop to change the color of the blockquote.

gray

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

red

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

green

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

blue

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

teal

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

pink

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

purple

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

cyan

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

orange

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

yellow

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

Variants

Use the variant prop to change the visual style of the blockquote.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.

Icon

Here's an example of how to compose the Float and Blockquote.Icon to show an icon on the blockquote. The default icon is a double quote.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

Alternatively, you can render a custom icon.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

Justify

Use the justify prop to change the alignment of the blockquote.

start

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

center

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

end

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
— Wren Ashford

With Avatar

Here's an example of how to compose the Blockquote, Avatar and Float components to create a stunning testimonial component.

Keep one lantern lit for the street you know and another for the street you have not found yet. A city is only lost when its people stop looking for the corners they have not seen.
WA
Wren Ashford

Closed Component

Code
import { Show, omit } from 'solid-js';
import type { JSX } from '@solidjs/web';
import { Blockquote, type BlockquoteRootProps } from '@leverui/components';

export type ClosedBlockquoteProps = BlockquoteRootProps & {
  cite?: JSX.Element;
  citeUrl?: string | undefined;
  icon?: JSX.Element;
  showDash?: boolean | undefined;
};

export function ClosedBlockquote(props: ClosedBlockquoteProps) {
  const root = omit(props, 'children', 'cite', 'citeUrl', 'icon', 'showDash');

  return (
    <Blockquote.Root {...root}>
      {props.icon}
      <Blockquote.Content cite={props.citeUrl}>{props.children}</Blockquote.Content>
      <Show when={props.cite}>
        <Blockquote.Caption>
          {props.showDash ? '— ' : ''}
          <cite>{props.cite}</cite>
        </Blockquote.Caption>
      </Show>
    </Blockquote.Root>
  );
}

Props

Root

PropDefaultTypeDescription
colorPalettegraystringColor palette, built-in or your own.
justifystart'start' | 'center' | 'end'Quote alignment. Responsive.
variantsubtle'subtle' | 'solid' | 'plain'Blockquote style. Responsive.
asfigureNative HTML tagHTML tag to render.
asChild—Solid render functionRender your own element with the blockquote's props.
unstyledfalsebooleanTurn off the Lever UI styles.

Blockquote.Root renders a figure, Content a blockquote, and Caption a figcaption.

Blockquote.PropsProvider sets default props for the blockquotes inside it. A prop on a blockquote wins.

Customize with CSS

Stable classes: .leverui-blockquote__root, __content, __caption, __icon. Root attributes: data-variant, data-justify, data-leverui-color-palette.

Code
.article-quote {
  --leverui-colors-color-palette-solid: rebeccapurple;
}

.article-quote .leverui-blockquote__caption {
  color: rebeccapurple;
}

Explorer

Click a part name to highlight it in the preview.

Component Anatomy

Hover to highlight, click to select parts