Quote

Short inline quotation.

use radix_yew_themes::{Quote, Text};
use yew::prelude::*;

#[function_component]
pub fn QuoteExample() -> Html {
    html! {
        <Text>
            {"His famous quote, "}
            <Quote>{"Styles come and go. Good design is a language, not a style"}</Quote>{",
            elegantly summs up Massimo's philosophy of design."}
        </Text>
    }
}

API Reference

This component is based on the q element and supports common margin props.

PropTypeDefault
as_childOption<Callback<QuoteChildProps>>-
truncateOption<bool>-
wrapOption<Responsive<TextWrap>>-

Examples

Truncate

Use the truncate prop to truncate text with an ellipsis when it overflows its container.

use radix_yew_themes::{Flex, Quote};
use yew::prelude::*;

#[function_component]
pub fn QuoteTruncateExample() -> Html {
    html! {
        <Flex max_width="300px">
            <Quote truncate=true>
                {"The goal of typography is to relate font size, line height, and line width
                in a proportional way that maximizes beauty and makes reading easier and
                more pleasant."}
            </Quote>
        </Flex>
    }
}

See Also