Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/text-style-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,31 @@

---

### `fontVariationSettings`

Configures variation axes for a variable font. Each axis is identified by a four-character OpenType tag, such as `wght` for weight, `wdth` for width, `opsz` for optical size, or a custom axis supported by the font. Settings can be provided as an object or as a CSS-compatible string.

The object and string forms below are equivalent; both set the wght axis to 500:

```tsx
<Text

Check failure on line 837 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
style={{

Check failure on line 838 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Replace `····` with `··`
fontVariationSettings: {wght: 500},

Check failure on line 839 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
// Equivalent CSS-compatible string:

Check failure on line 840 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
fontVariationSettings: "'wght' 500",

Check failure on line 841 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
}}>

Check failure on line 842 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
Variable font

Check failure on line 843 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
</Text>

Check failure on line 844 in docs/text-style-props.md

View workflow job for this annotation

GitHub Actions / lint-website

Delete `··`
```

For more information about variation axes and the CSS string syntax, see MDN's font-variation-settings (https://developer.mozilla.org/en-US/docs/Web/CSS/font-variation-settings) documentation.

| Type |
| -------------------------------------------- |
| string or object: `{[axis: string]: number}` |

---

### `letterSpacing`

Increase or decrease the spacing between characters. By default there is no extra letter spacing.
Expand Down
Loading