# View

Use `View` when a page has the same content in several versions, like one per programming language. Every distinct `title` on the page becomes an option in a switcher under the page title, and only the chosen version shows:

```mdx
<View title="JavaScript" icon="js">
  ## Install the SDK

  npm install example-sdk
</View>

<View title="Python" icon="python">
  ## Install the SDK

  pip install example-sdk
</View>
```

A page can have several `View`s with the same title - one switcher controls all of them, and content outside any `View` always shows.

- The table of contents only lists the headings in the version that's showing.
- The reader's choice is remembered, so it carries over to other pages that have the same titles.
- A link to a heading inside a hidden version switches to that version.

Use [Tabs](/docs/content/components/tabs/) instead when only one section of a page differs, or [CodeGroup](/docs/content/components/code-group/) when only a code sample does.

**`View` props**

<Parameter name="title" type="string" required>
  The version's name in the switcher. `View`s with the same title show and hide together.
</Parameter>

<Parameter name="icon" type="string">
  Shown next to the title in the switcher. Any icon string - see [Icons](/docs/content/components/icon/#icons).
</Parameter>