Hotwire Native Modals

I have a Hotwire Native iOS app, and I would love to have specific functionality depending on if the page is shown in a modal or not. I was wondering if it is possible to either:

  1. add a specific css class when the page is shown in a modal
  2. enable or disable specific bridge components in modals vs regular views

Any clues in which direction I should look, or does this seem like a no no to do.