A component for Conditional UI elements?

Is there a theme component to add buttons, css, or links based on conditions?

I want to add a button were users can request memebership if they don’t have it yet in certain categories.