title: SwiftUI: Increase tap/drag area for user interaction
body: <p>I've built a custom slider in SwiftUI with a thumb dragger that is 20x20. Everything is working, except the tap target is quite small since it's just the 20x20 view. I'm looking for a way to increase this to make it easier for users to interact with my slider. Is there a way to do this in SwiftUI?</p>
  
  <p>I tried wrapping my thumb in <code>Color.clear.overlay</code> and setting the frame to 60x60. This works if the color is solid, like <code>red</code>, but with <code>clear</code> the tap target seems to revert back to visible pixels of 20x20.</p>
  
  <p>You can see on this gif I'm able to drag the slider even when clicking outside of the thumb.</p>
  
  <p><a href="https://i.stack.imgur.com/KiCiF.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/KiCiF.gif" alt="slider with red background"></a></p>
  
  <p>However, as soon as I change the color to <code>clear</code>, this area no longer receives interactions.</p>
  
  <p><a href="https://i.stack.imgur.com/Y96SV.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/Y96SV.gif" alt="slider with clear background"></a></p>