Subtext

Subtext provides a simple way to render subtext-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

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

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

Large Subtext

Medium Subtext

Small Subtext

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