Text
Text with paired font sizes and line heights.
Deployment completeYour changes are live on arene.style.Updated just now
Installation
Needs the arene setup first.
Install the packages it imports:
Set up the token layer. See Installation.
Copy the component into your project.
Change the @/ imports if your project uses different aliases.
Usage
Unset size, tone and weight inherit. textStyles exports sizes, tones and
weights for use in another element's stylex.props() call.
Size
Each size includes its line height. Leave size unset to inherit.
Updated just nowChanges are saved automatically.Read the project overview.Build something useful.Your next projectStart buildingMade for the web
Tone
Leave tone unset to inherit the surrounding color.
Deployment completeLast updated just now
Weight
Leave weight unset to inherit the surrounding weight.
Normal textMedium textSemibold textBold text
Composition
Pass render to choose a semantic element. Put its props on that element.
Changes are saved automatically.
API reference
See Base UI's useRender reference for composition props. Native element props are forwarded.
| Prop | Type | Default |
|---|---|---|
size | keyof typeof textStyles.sizes | None |
tone | "muted" | None |
weight | "normal" | "medium" | "semibold" | "bold" | None |
render | useRender.RenderProp | Native element |
xstyle | StyleXStyles | None |
className | string | None |
style | CSSProperties | None |
Data attributes
| Attribute | On | Effect |
|---|---|---|
data-slot="text" | root | Identifies the component |
data-size | root | Mirrors size |