How to apply modifiers only to specific elements?

Hi all,
So i have this very simplified code, where I basically have an HStack with a custom modifier.
My question is, how can i keep the modifier on the HStack, but dont let the modifier apply to the button inside the HStack?

In this case i could just apply the modifier directly to the textfield, but as i mentioned, this is a very simplified version of my code, so let’s just assume the modifier has to be on the HStack

This is the modifier

Modifiers applied to the parent view are applied to all the Views within that view. You have to be careful how you apply modifiers to avoid unexpected results.

Thanks, so what you are saying is that its not possible to make the button not follow that modifier, right?

I don’t know of a way to prevent a modifier from applying to a particular object within a view.

When it comes to animation there are ways to prevent animation from applying to specific objects and that is done by adding the modifier .animation(.none) but that’s a specific case.

Correction, that modifier you are applying is applying to the VStack as a whole rather than the individual Views within the VStack.