Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions navigation/divisions.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Tabs, Anchors, Dropdowns
title: "Tabs, Anchors, Dropdowns"
---

## Tabs
Expand All @@ -8,9 +8,15 @@ Tabs help distinguish between different topics or sections of your
documentation.

<Frame>
<img className="block dark:hidden rounded-md" src="/images/tabs-light.png" />

<img className="hidden dark:block rounded-md" src="/images/tabs-dark.png" />
<img
className="block dark:hidden rounded-md"
src="/images/tabs-light.png"
/>

<img
className="hidden dark:block rounded-md"
src="/images/tabs-dark.png"
/>
</Frame>

```json docs.json
Expand Down Expand Up @@ -45,9 +51,15 @@ documentation.
Anchors are another way to section your content. They show up on top of your side navigation.

<Frame>
<img className="block dark:hidden rounded-md" src="/images/anchor-light.png" />

<img className="hidden dark:block rounded-md" src="/images/anchor-dark.png" />
<img
className="block dark:hidden rounded-md"
src="/images/anchor-light.png"
/>

<img
className="hidden dark:block rounded-md"
src="/images/anchor-dark.png"
/>
</Frame>

The configuration is very similar to the tab configuration. We highly recommend that you set an `icon` field as well.
Expand All @@ -57,25 +69,13 @@ The icon values are [fontawesome icons](https://fontawesome.com/search)
"navigation": {
"anchors": [
{
"anchor": "Documentation",
"icon": "book-open",
"pages": [
"quickstart",
"development",
"navigation"
]
}
{
"anchor": "API References",
"icon": "sqaure-terminal",
"pages": [
"api-reference/get",
"api-reference/post",
"api-reference/delete"
]
}
"anchor": "Community",
"icon": "people-group",
"href": "https://external-link.com/community"
},
{
"anchor": "Blog",
"icon": "blog",
"href": "https://external-link.com/blog"
}
]
Expand All @@ -85,13 +85,20 @@ The icon values are [fontawesome icons](https://fontawesome.com/search)
## Dropdowns

<Frame>
<img className="block dark:hidden rounded-md" src="/images/dropdowns-light.png" />

<img className="hidden dark:block rounded-md" src="/images/dropdowns-dark.png" />
<img
className="block dark:hidden rounded-md"
src="/images/dropdowns-light.png"
/>

<img
className="hidden dark:block rounded-md"
src="/images/dropdowns-dark.png"
/>
</Frame>

Dropdowns show up in the same place as anchors, but are consolidated into a single dropdown.
We also recommend that you set an icon for each dropdown item ([options](https://fontawesome.com/search)).

```json docs.json
"navigation": {
"dropdowns": [
Expand Down Expand Up @@ -121,7 +128,6 @@ We also recommend that you set an icon for each dropdown item ([options](https:/
}
```


## Nested Hierarchy

You can use any combination of anchors, tabs, and dropdowns - either one can be nested within each other interchangeably.
Expand Down Expand Up @@ -163,6 +169,7 @@ You can use any combination of anchors, tabs, and dropdowns - either one can be
}
```


```json Top-Level Tabs
{
"navigation": {
Expand Down Expand Up @@ -198,4 +205,4 @@ You can use any combination of anchors, tabs, and dropdowns - either one can be
}
```

</CodeGroup>
</CodeGroup>