interface TypographyProps {
    altText?: null | string;
    children?: ReactNode;
    className?: string;
    color?: "link" | "inherit" | "mid-emphasis" | "low-emphasis" | "brand" | "error" | "text-on-primary";
    limitLines?: number;
    size?: "inherit" | "XS" | "S" | "M" | "L" | "XL" | "3XL" | "4XL" | "5XL" | "2XS" | "2XL" | "6XL";
    type?: "span" | "div" | "heading" | "paragraph";
    weight?: "bold" | "inherit" | "regular";
}

Properties

altText?: null | string

Alternative text to display on hover (HTML standard)

children?: ReactNode

Children to render as typography

className?: string

Custom class to give the html component

color?: "link" | "inherit" | "mid-emphasis" | "low-emphasis" | "brand" | "error" | "text-on-primary"

Color of the text

limitLines?: number

When provided, a limit will be placed on the number of lines to render, using the -webkit-line-clamp CSS property. Note that browsers that do not support this property will instead just hide the overflow. Lines that are hidden will be replaced with an ellipsis.

size?: "inherit" | "XS" | "S" | "M" | "L" | "XL" | "3XL" | "4XL" | "5XL" | "2XS" | "2XL" | "6XL"

Size of the text. Will inform heading size when used with heading

type?: "span" | "div" | "heading" | "paragraph"

Type of the tag used for the text. Usually heading or paragraph for bodies of text, span for inline texts

weight?: "bold" | "inherit" | "regular"

Weight of the text. Will default to bold for headings

Generated using TypeDoc