Text
Text is a token-backed typography component to display body text.Installation
| Install | yarn add @atlaskit/primitives |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/primitives, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | Text alignment. |
|---|---|
| Type | "end" | "start" | "center" |
| Description | HTML tag to be rendered. Defaults to |
|---|---|
| Type | "em" | "p" | "span" | "strong" |
| Description | Elements rendered within the Text element. |
|---|---|
| Type | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal |
| Description | Token representing text color with a built-in fallback value.
Will apply inverse text color automatically if placed within a Box with bold background color.
Defaults to |
|---|---|
| Type | "inherit" | TextColor |
| Description |
|
|---|---|
| Type | never |
| Description | The HTML |
|---|---|
| Type | string |
| Description | The number of lines to limit the provided text to. Text will be truncated with an ellipsis. When |
|---|---|
| Type | number |
| Description | Allows getting a ref to the component instance.
Once the component unmounts, React will set @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|---|---|
| Type | string | Ref<any> |
| Description | Accessible role. |
|---|---|
| Type | string |
| Description | Text size. |
|---|---|
| Type | "large" | "medium" | "small" |
| Description | A unique string that appears as data attribute |
|---|---|
| Type | string |
| Description | |
|---|---|
| Type | "medium" | "bold" | "regular" | "semibold" |
| Description | Bounded style overrides. |
|---|---|
| Type | false | (XCSSValue<"fontVariantNumeric" | "overflowWrap" | "textDecorationLine", DesignTokenStyles, ""> & {} & XCSSPseudo<"fontVariantNumeric" | "overflowWrap" | "textDecorationLine", never, never, DesignTokenStyles> & XCSSMediaQuery<...> & { ...; } & { ...; }) |