Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/flexbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ export default App;

- [`gap`](layout-props#gap) sets the size of the gap (gutter) between rows and columns. It is a shorthand for `rowGap` and `columnGap`.

You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items.
You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items. Gap properties accept numeric values (in points) or percentage strings (e.g. `'10%'` on the [New Architecture](/architecture/landing-page)).

<Tabs groupId="language" queryString defaultValue={constants.defaultSnackLanguage} values={constants.snackLanguages}>
<TabItem value="javascript">
Expand Down
24 changes: 12 additions & 12 deletions docs/layout-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,13 +544,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/bottom)

### `columnGap`

`columnGap` works like `column-gap` in CSS. Only pixel units are supported in React Native.
`columnGap` works like `column-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -670,13 +670,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wr

### `gap`

`gap` works like `gap` in CSS. Only pixel units are supported in React Native.
`gap` works like `gap` in CSS. It is a shorthand for `rowGap` and `columnGap`. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -1294,13 +1294,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right)

### `rowGap`

`rowGap` works like `row-gap` in CSS. Only pixel units are supported in React Native.
`rowGap` works like `row-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down
14 changes: 11 additions & 3 deletions docs/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ The skew transformations require a string so that the transform may be expressed
}
```

The translate transformations (`translateX` and `translateY`) accept numbers (points) or percentage strings (e.g. `'50%'`, `'100%'`). When using percentages, the offset is relative to the element's width (for `translateX`) or height (for `translateY`). Percentage translation is supported on the [New Architecture](/architecture/landing-page). For example:

```js
{
transform: [{translateX: '50%'}, {translateY: 100}],
}
```

### Matrix Transform

The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
Expand Down Expand Up @@ -259,9 +267,9 @@ For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
:::

| Type | Required |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number}`, `{translateY: number}`, `{skewX: string}`, `{skewY: string}` or string | No |
| Type | Required |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number \| string}`, `{translateY: number \| string}`, `{skewX: string}`, `{skewY: string}` or string | No |

---

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.77/flexbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ export default App;

- [`gap`](layout-props#gap) sets the size of the gap (gutter) between rows and columns. It is a shorthand for `rowGap` and `columnGap`.

You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items.
You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items. Gap properties accept numeric values (in points) or percentage strings (e.g. `'10%'` on the [New Architecture](/architecture/landing-page)).

<Tabs groupId="language" queryString defaultValue={constants.defaultSnackLanguage} values={constants.snackLanguages}>
<TabItem value="javascript">
Expand Down
24 changes: 12 additions & 12 deletions website/versioned_docs/version-0.77/layout-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/bottom)

### `columnGap`

`columnGap` works like `column-gap` in CSS. Only pixel units are supported in React Native.
`columnGap` works like `column-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -671,13 +671,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wr

### `gap`

`gap` works like `gap` in CSS. Only pixel units are supported in React Native.
`gap` works like `gap` in CSS. It is a shorthand for `rowGap` and `columnGap`. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -1295,13 +1295,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right)

### `rowGap`

`rowGap` works like `row-gap` in CSS. Only pixel units are supported in React Native.
`rowGap` works like `row-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down
14 changes: 11 additions & 3 deletions website/versioned_docs/version-0.77/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ The skew transformations require a string so that the transform may be expressed
}
```

The translate transformations (`translateX` and `translateY`) accept numbers (points) or percentage strings (e.g. `'50%'`, `'100%'`). When using percentages, the offset is relative to the element's width (for `translateX`) or height (for `translateY`). Percentage translation is supported on the [New Architecture](/architecture/landing-page). For example:

```js
{
transform: [{translateX: '50%'}, {translateY: 100}],
}
```

### Matrix Transform

The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
Expand Down Expand Up @@ -260,9 +268,9 @@ For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
:::

| Type | Required |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number}`, `{translateY: number}`, `{skewX: string}`, `{skewY: string}` or string | No |
| Type | Required |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number \| string}`, `{translateY: number \| string}`, `{skewX: string}`, `{skewY: string}` or string | No |

---

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.78/flexbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ export default App;

- [`gap`](layout-props#gap) sets the size of the gap (gutter) between rows and columns. It is a shorthand for `rowGap` and `columnGap`.

You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items.
You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items. Gap properties accept numeric values (in points) or percentage strings (e.g. `'10%'` on the [New Architecture](/architecture/landing-page)).

<Tabs groupId="language" queryString defaultValue={constants.defaultSnackLanguage} values={constants.snackLanguages}>
<TabItem value="javascript">
Expand Down
24 changes: 12 additions & 12 deletions website/versioned_docs/version-0.78/layout-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/bottom)

### `columnGap`

`columnGap` works like `column-gap` in CSS. Only pixel units are supported in React Native.
`columnGap` works like `column-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -671,13 +671,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wr

### `gap`

`gap` works like `gap` in CSS. Only pixel units are supported in React Native.
`gap` works like `gap` in CSS. It is a shorthand for `rowGap` and `columnGap`. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down Expand Up @@ -1295,13 +1295,13 @@ See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right)

### `rowGap`

`rowGap` works like `row-gap` in CSS. Only pixel units are supported in React Native.
`rowGap` works like `row-gap` in CSS. It accepts numbers (in points) or percentage strings (e.g. `'10%'`). Percentage values are supported on the [New Architecture](/architecture/landing-page).

See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) for more details.

| Type | Required |
| ------ | -------- |
| number | No |
| Type | Required |
| -------------- | -------- |
| number, string | No |

---

Expand Down
14 changes: 11 additions & 3 deletions website/versioned_docs/version-0.78/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ The skew transformations require a string so that the transform may be expressed
}
```

The translate transformations (`translateX` and `translateY`) accept numbers (points) or percentage strings (e.g. `'50%'`, `'100%'`). When using percentages, the offset is relative to the element's width (for `translateX`) or height (for `translateY`). Percentage translation is supported on the [New Architecture](/architecture/landing-page). For example:

```js
{
transform: [{translateX: '50%'}, {translateY: 100}],
}
```

### Matrix Transform

The `matrix` transform accepts a 4x4 transformation matrix as an array of 16 numbers. This allows you to apply complex transformations that combine translation, rotation, scaling, and skewing in a single operation.
Expand Down Expand Up @@ -260,9 +268,9 @@ For example, to apply a combination of scale and skew:
Matrix transforms are useful when you need to apply pre-calculated transformation matrices, such as those from animation libraries or when building UI editor applications. For basic transformations, it's recommended to use the individual transform properties (scale, rotate, translate, etc.) as they are more readable.
:::

| Type | Required |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number}`, `{translateY: number}`, `{skewX: string}`, `{skewY: string}` or string | No |
| Type | Required |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| array of objects: `{matrix: number[]}`, `{perspective: number}`, `{rotate: string}`, `{rotateX: string}`, `{rotateY: string}`, `{rotateZ: string}`, `{scale: number}`, `{scaleX: number}`, `{scaleY: number}`, `{translateX: number \| string}`, `{translateY: number \| string}`, `{skewX: string}`, `{skewY: string}` or string | No |

---

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.79/flexbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ export default App;

- [`gap`](layout-props#gap) sets the size of the gap (gutter) between rows and columns. It is a shorthand for `rowGap` and `columnGap`.

You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items.
You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items. Gap properties accept numeric values (in points) or percentage strings (e.g. `'10%'` on the [New Architecture](/architecture/landing-page)).

<Tabs groupId="language" queryString defaultValue={constants.defaultSnackLanguage} values={constants.snackLanguages}>
<TabItem value="javascript">
Expand Down
Loading
Loading