Text
An abstraction for using Primer's typographic styles.
Page navigation navigation
React
readyReviewed for a11y
Rails
readyNot reviewed for a11y
Example - changing size and weight
This example will not work until we have upgrade `@primer/react` to a version that supports the `size` and `weight` props
Props
Text
Name | Required | Description |
---|---|---|
as | React.ElementType | |
sx | SystemStyleObject | |
size | 'large' | 'medium' | 'small' | |
weight | 'light' | 'normal' | 'medium' | 'semibold' | |
whiteSpace | 'pre' | 'normal' | 'nowrap' | 'pre-wrap' | 'pre-line' |