Body Text

Body Text provides a simple way to render body-level text with built-in support for Canvas type tokens.

GitHubStorybook
yarn add @workday/canvas-kit-react
Sources
GitHubStorybook
Install
yarn add @workday/canvas-kit-react

Usage Guidance

Coming soon!

Examples

Basic Example

BodyText is a Type Level component (along with Title, Heading, and Subtext) built on top of Text which provides a simple way to render body-level text according to the Canvas type hierarchy.

BodyText renders a <p> element by default with styles equivalent to type.levels.body[size]. You may override the rendered element using the as prop.

Large Body Text

Medium Body Text

Small Body Text

Props

NameTypeDefaultDescription
size*"small" | "large" | "medium"Each type level has three sizes: `large`, `medium`, and `small`.
variantkeyof CanvasTypeVariants | undefinedType variant token names: `error`, `hint` or `inverse`. @example ```tsx <Text variant="error" typeLevel="subtext.large">Error text</Text> ```

Can't Find What You Need?

Check out our FAQ section which may help you find the information you're looking for.

FAQ Section