react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Switch styles customization

Open mgarv-amzn opened this issue 1 month ago • 0 comments

The current Switch component allows you to customize:

  • trackColor: just the background, depending on 'false' or 'true' values
  • thumbColor: if you need to change it depending on the same values allowed for the trackColor you need to create a local state to track if it's true or false (enabled or disabled)

The issue is that:

  1. There is no consistent way to define colors for true and false values, you need to add extra logic for the thumbColor
  2. The only thing you can customize is the background color, there is no option if you want to display just a border when the value is false to match a minimal design. You need to do a workaround if you want to add a custom border also depending on the value.

mgarv-amzn avatar Nov 27 '25 16:11 mgarv-amzn