From 206e9c06e7bdf3eeeff3c029dd0df6b7655ad86e Mon Sep 17 00:00:00 2001 From: Adrian Cotfas Date: Fri, 17 Apr 2026 17:15:48 +0300 Subject: [PATCH 1/2] docs: update switch.md after adding Material Design 3 support for Switch --- docs/switch.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/switch.md b/docs/switch.md index 4f9055c6256..8df04539263 100644 --- a/docs/switch.md +++ b/docs/switch.md @@ -112,6 +112,46 @@ Color of the foreground switch grip. If this is set on iOS, the switch grip will --- +### `thumbColorForFalse`
Android
+ +Thumb color when the switch is off. Overrides `thumbColor` for the unchecked state. + +| Type | +| ------------------ | +| [color](colors.md) | + +--- + +### `thumbColorForTrue`
Android
+ +Thumb color when the switch is on. Overrides `thumbColor` for the checked state. + +| Type | +| ------------------ | +| [color](colors.md) | + +--- + +### `thumbIcon`
Android
+ +Drawable resource name(s) to display as an icon inside the thumb. Accepts a `{false, true}` object (like `trackColor`) so each state can have a different icon. Omit a key to show no icon for that state. Requires Material Design 3 (MaterialSwitch). + +| Type | +| ------------------------------------------- | +| `{false?: string \| null, true?: string \| null}` | + +--- + +### `thumbIconTint`
Android
+ +Color tint applied to the thumb icon. + +| Type | +| ------------------ | +| [color](colors.md) | + +--- + ### `trackColor` Custom colors for the switch track. From 778bf2722cf0e4c56286918cb613cee283f649d1 Mon Sep 17 00:00:00 2001 From: Adrian Cotfas Date: Mon, 20 Apr 2026 09:19:23 +0300 Subject: [PATCH 2/2] docs: update switch.md table formatting --- docs/switch.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/switch.md b/docs/switch.md index 8df04539263..af2e636760c 100644 --- a/docs/switch.md +++ b/docs/switch.md @@ -61,7 +61,7 @@ Inherits [View Props](view.md#props). If true the user won't be able to toggle the switch. | Type | Default | -| ---- | ------- | +|------|---------| | bool | `false` | --- @@ -71,7 +71,7 @@ If true the user won't be able to toggle the switch. On iOS, custom color for the background. This background color can be seen either when the switch value is `false` or when the switch is disabled (and the switch is translucent). | Type | -| ------------------ | +|--------------------| | [color](colors.md) | --- @@ -81,7 +81,7 @@ On iOS, custom color for the background. This background color can be seen eithe Invoked when the user tries to change the value of the switch. Receives the change event as an argument. If you want to only receive the new value, use `onValueChange` instead. | Type | -| -------- | +|----------| | function | --- @@ -91,7 +91,7 @@ Invoked when the user tries to change the value of the switch. Receives the chan Invoked when the user tries to change the value of the switch. Receives the new value as an argument. If you want to instead receive an event, use `onChange`. | Type | -| -------- | +|----------| | function | --- @@ -107,7 +107,7 @@ A ref setter that will be assigned an [element node](element-nodes) when mounted Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow. | Type | -| ------------------ | +|--------------------| | [color](colors.md) | --- @@ -117,7 +117,7 @@ Color of the foreground switch grip. If this is set on iOS, the switch grip will Thumb color when the switch is off. Overrides `thumbColor` for the unchecked state. | Type | -| ------------------ | +|--------------------| | [color](colors.md) | --- @@ -127,7 +127,7 @@ Thumb color when the switch is off. Overrides `thumbColor` for the unchecked sta Thumb color when the switch is on. Overrides `thumbColor` for the checked state. | Type | -| ------------------ | +|--------------------| | [color](colors.md) | --- @@ -136,8 +136,8 @@ Thumb color when the switch is on. Overrides `thumbColor` for the checked state. Drawable resource name(s) to display as an icon inside the thumb. Accepts a `{false, true}` object (like `trackColor`) so each state can have a different icon. Omit a key to show no icon for that state. Requires Material Design 3 (MaterialSwitch). -| Type | -| ------------------------------------------- | +| Type | +|---------------------------------------------------| | `{false?: string \| null, true?: string \| null}` | --- @@ -147,7 +147,7 @@ Drawable resource name(s) to display as an icon inside the thumb. Accepts a `{fa Color tint applied to the thumb icon. | Type | -| ------------------ | +|--------------------| | [color](colors.md) | --- @@ -159,7 +159,7 @@ Custom colors for the switch track. _iOS_: When the switch value is `false`, the track shrinks into the border. If you want to change the color of the background exposed by the shrunken track, use [`ios_backgroundColor`](switch.md#ios_backgroundColor). | Type | -| ------------------------------------------------------------ | +|--------------------------------------------------------------| | `md object: {false: [color](colors), true: [color](colors)}` | --- @@ -169,5 +169,5 @@ _iOS_: When the switch value is `false`, the track shrinks into the border. If y The value of the switch. If true the switch will be turned on. Default value is false. | Type | -| ---- | +|------| | bool |