Products and versions props for If component

The <If> component now supports products and versions props, allowing you to conditionally show content based on where a page is located within the navigation structure.

Markdown
1<If products={["api-reference"]}>
2 This content only shows in the api-reference product
3</If>
4
5<If versions={["v2", "v3"]}>
6 This content only shows in v2 or v3
7</If>
8
9<If products={["docs"]} versions={["v2"]}>
10 All conditions must match (AND logic)
11</If>

You can also use the not prop to invert the condition, showing content when the current product or version does not match.

Learn more about the If component.