|
1 | 1 | --- |
2 | | -title: Tabs and Anchors |
| 2 | +title: Tabs, Anchors, Dropdowns |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | ## Tabs |
@@ -42,46 +42,89 @@ documentation. |
42 | 42 |
|
43 | 43 | ## Anchors |
44 | 44 |
|
45 | | -Anchors are another way to section your content. |
| 45 | +Anchors are another way to section your content. They show up on top of your side navigation. |
46 | 46 |
|
47 | 47 | <Frame> |
48 | 48 | <img className="block dark:hidden rounded-md" src="/images/anchor-light.png" /> |
49 | 49 |
|
50 | 50 | <img className="hidden dark:block rounded-md" src="/images/anchor-dark.png" /> |
51 | 51 | </Frame> |
52 | 52 |
|
53 | | -The configuration is very similar to the tab configuration. |
| 53 | +The configuration is very similar to the tab configuration. We highly recommend that you set an `icon` field as well. |
| 54 | +The icon values are [fontawesome icons](https://fontawesome.com/search) |
54 | 55 |
|
55 | 56 | ```json docs.json |
56 | 57 | "navigation": { |
57 | 58 | "anchors": [ |
| 59 | + { |
| 60 | + "anchor": "Documentation", |
| 61 | + "icon": "book-open", |
| 62 | + "pages": [ |
| 63 | + "quickstart", |
| 64 | + "development", |
| 65 | + "navigation" |
| 66 | + ] |
| 67 | + } |
58 | 68 | { |
59 | 69 | "anchor": "API References", |
| 70 | + "icon": "sqaure-terminal", |
60 | 71 | "pages": [ |
61 | 72 | "api-reference/get", |
62 | 73 | "api-reference/post", |
63 | 74 | "api-reference/delete" |
64 | 75 | ] |
65 | | - }, |
| 76 | + } |
66 | 77 | { |
67 | | - "anchor": "SDKs", |
| 78 | + "anchor": "Blog", |
| 79 | + "href": "https://external-link.com/blog" |
| 80 | + } |
| 81 | + ] |
| 82 | +} |
| 83 | +``` |
| 84 | + |
| 85 | +## Dropdowns |
| 86 | + |
| 87 | +<Frame> |
| 88 | + <img className="block dark:hidden rounded-md" src="/images/dropdowns-light.png" /> |
| 89 | + |
| 90 | + <img className="hidden dark:block rounded-md" src="/images/dropdowns-dark.png" /> |
| 91 | +</Frame> |
| 92 | + |
| 93 | +Dropdowns show up in the same place as anchors, but are consolidated into a single dropdown. |
| 94 | +We also recommend that you set an icon for each dropdown item ([options](https://fontawesome.com/search)). |
| 95 | +```json docs.json |
| 96 | +"navigation": { |
| 97 | + "dropdowns": [ |
| 98 | + { |
| 99 | + "dropdown": "Documentation", |
| 100 | + "icon": "book-open", |
68 | 101 | "pages": [ |
69 | | - "sdk/fetch", |
70 | | - "sdk/create", |
71 | | - "sdk/delete", |
| 102 | + "quickstart", |
| 103 | + "development", |
| 104 | + "navigation" |
72 | 105 | ] |
73 | | - }, |
| 106 | + } |
74 | 107 | { |
75 | | - "anchor": "Blog", |
| 108 | + "dropdown": "API References", |
| 109 | + "icon": "sqaure-terminal", |
| 110 | + "pages": [ |
| 111 | + "api-reference/get", |
| 112 | + "api-reference/post", |
| 113 | + "api-reference/delete" |
| 114 | + ] |
| 115 | + } |
| 116 | + { |
| 117 | + "dropdown": "Blog", |
76 | 118 | "href": "https://external-link.com/blog" |
77 | 119 | } |
78 | 120 | ] |
79 | 121 | } |
80 | 122 | ``` |
81 | 123 |
|
| 124 | + |
82 | 125 | ## Nested Hierarchy |
83 | 126 |
|
84 | | -You can use both anchors and tabs together - either one can be nested within each other interchangeably. |
| 127 | +You can use any combination of anchors, tabs, and dropdowns - either one can be nested within each other interchangeably. |
85 | 128 |
|
86 | 129 | <CodeGroup> |
87 | 130 |
|
|
0 commit comments