Skip to content

Commit 21446a5

Browse files
Refactor: Replace dropdowns with tabs for navigation
Co-authored-by: han <[email protected]>
1 parent 6ad66f3 commit 21446a5

File tree

3 files changed

+28
-83
lines changed

3 files changed

+28
-83
lines changed

changelog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ noindex: true
418418
## Other improvements
419419

420420
- [Guide to Technical Writing:](https://mintlify.com/guides/introduction)Best practices for writing technical documentation, including audience research, content types, and writing tips.
421-
- [Dropdown component](navigation#dropdowns): Organize navigation with a dropdown, in addition to tabs and anchors.
421+
- [Tab component](navigation#tabs): Organize navigation with tabs and anchors for better user experience.
422422
- [AI syntax fixer](https://x.com/ricardonunez_io/status/1892334887644123192): The web editor will catch if there’s a parsing error and use AI to suggest fixes.
423423
</Update>
424424

navigation.mdx

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ In the `navigation` object, `tabs` is an array where each entry is an object tha
157157

158158
### Menus
159159

160-
Menus add dropdown navigation items to a tab. Use menus to help users go directly to specific pages within a tab.
160+
Menus add sub-navigation items to a tab. Use menus to help users go directly to specific pages within a tab.
161161

162162
In the `navigation` object, `menu` is an array where each entry is an object that requires an `item` field and can contain other navigation fields such as groups, pages, icons, or links to external pages.
163163

@@ -274,52 +274,6 @@ Global anchors are particularly useful for linking to resources that are not par
274274
}
275275
```
276276

277-
## Dropdowns
278-
279-
Dropdowns are contained in an expandable menu at the top of your sidebar navigation. Each item in a dropdown directs to a section of your documentation.
280-
281-
<img
282-
className="block dark:hidden pointer-events-none"
283-
src="/images/navigation/dropdowns-light.png"
284-
/>
285-
286-
<img
287-
className="hidden dark:block pointer-events-none"
288-
src="/images/navigation/dropdowns-dark.png"
289-
/>
290-
291-
In the `navigation` object, `dropdowns` is an array where each entry is an object that requires a `dropdown` field and can contain other navigation fields such as groups, pages, icons, or links to external pages.
292-
293-
```json
294-
{
295-
"navigation": {
296-
"dropdowns": [
297-
{
298-
"dropdown": "Documentation",
299-
"icon": "book-open",
300-
"pages": [
301-
"quickstart",
302-
"development",
303-
"navigation"
304-
]
305-
},
306-
{
307-
"dropdown": "API reference",
308-
"icon": "square-terminal",
309-
"pages": [
310-
"api-reference/get",
311-
"api-reference/post",
312-
"api-reference/delete"
313-
]
314-
},
315-
{
316-
"dropdown": "Blog",
317-
"href": "https://external-link.com/blog"
318-
}
319-
]
320-
}
321-
}
322-
```
323277

324278
## OpenAPI
325279

@@ -465,7 +419,7 @@ For automated translations, [contact our sales team](mailto:[email protected]) to
465419

466420
## Nesting
467421

468-
You can use any combination of anchors, tabs, and dropdowns. The components can be nested within each other interchangeably to create your desired navigation structure.
422+
You can use any combination of anchors and tabs. The components can be nested within each other interchangeably to create your desired navigation structure.
469423

470424
<CodeGroup>
471425

@@ -616,7 +570,7 @@ When a user expands a navigation group, some themes will automatically navigate
616570
```json
617571
{
618572
"interaction": {
619-
"drilldown": true // Force navigation to first page when a user expands a dropdown
573+
"drilldown": true // Force navigation to first page when a user expands a navigation group
620574
}
621575
}
622576
```

settings.mdx

Lines changed: 24 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -393,21 +393,21 @@ See [Themes](themes) for more information.
393393
</Expandable>
394394
</ResponseField>
395395

396-
<ResponseField name="dropdowns" type="array of object">
397-
Dropdown menus for organizing related content.
396+
<ResponseField name="tabs" type="array of object">
397+
Tab navigation for organizing content into distinct sections.
398398

399-
<Expandable title="Dropdowns">
400-
<ResponseField name="dropdown" type="string" required>
401-
Display name of the dropdown.
399+
<Expandable title="Tabs">
400+
<ResponseField name="tab" type="string" required>
401+
Display name of the tab.
402402

403403
Minimum length: 1
404404
</ResponseField>
405405
<IconsOptional />
406406
<ResponseField name="hidden" type="boolean">
407-
Whether to hide this dropdown by default.
407+
Whether to hide this tab by default.
408408
</ResponseField>
409409
<ResponseField name="href" type="string (uri)" required>
410-
URL or path for the dropdown destination.
410+
URL or path for the tab destination.
411411
</ResponseField>
412412
</Expandable>
413413
</ResponseField>
@@ -430,8 +430,8 @@ See [Themes](themes) for more information.
430430

431431
</ResponseField>
432432

433-
<ResponseField name="dropdowns" type="array of object">
434-
[Dropdowns](navigation#dropdowns) for grouping related content.
433+
<ResponseField name="tabs" type="array of object">
434+
[Tabs](navigation#tabs) for organizing content into distinct sections.
435435

436436
</ResponseField>
437437
<ResponseField name="groups" type="array of object">
@@ -923,11 +923,10 @@ See [Themes](themes) for more information.
923923
"dark": "#0F172A"
924924
},
925925
"navigation": {
926-
"dropdowns": [
926+
"tabs": [
927927
{
928-
"dropdown": "Documentation",
928+
"tab": "Documentation",
929929
"icon": "book",
930-
"description": "How to use the Example Co. product",
931930
"groups": [
932931
{
933932
"group": "Getting started",
@@ -955,9 +954,8 @@ See [Themes](themes) for more information.
955954
]
956955
},
957956
{
958-
"dropdown": "Changelog",
957+
"tab": "Changelog",
959958
"icon": "history",
960-
"description": "Updates and changes",
961959
"pages": [
962960
"changelog"
963961
]
@@ -1072,11 +1070,10 @@ See [Themes](themes) for more information.
10721070
"dark": "#0F172A"
10731071
},
10741072
"navigation": {
1075-
"dropdowns": [
1073+
"tabs": [
10761074
{
1077-
"dropdown": "Documentation",
1075+
"tab": "Documentation",
10781076
"icon": "book",
1079-
"description": "How to use the Example Co. product",
10801077
"groups": [
10811078
{
10821079
"group": "Getting started",
@@ -1104,9 +1101,8 @@ See [Themes](themes) for more information.
11041101
]
11051102
},
11061103
{
1107-
"dropdown": "API reference",
1104+
"tab": "API reference",
11081105
"icon": "terminal",
1109-
"description": "How to use the Example Co. API",
11101106
"groups": [
11111107
{
11121108
"group": "API reference",
@@ -1123,9 +1119,8 @@ See [Themes](themes) for more information.
11231119
]
11241120
},
11251121
{
1126-
"dropdown": "Changelog",
1122+
"tab": "Changelog",
11271123
"icon": "history",
1128-
"description": "Updates and changes",
11291124
"pages": [
11301125
"changelog"
11311126
]
@@ -1263,12 +1258,11 @@ See [Themes](themes) for more information.
12631258
"languages": [ // [!code highlight:3]
12641259
{
12651260
"language": "en",
1266-
"dropdowns": [
1261+
"tabs": [
12671262
{
1268-
"dropdown": "Documentation",
1263+
"tab": "Documentation",
12691264
"icon": "book",
1270-
"description": "How to use the Example Co. product",
1271-
"pages": [
1265+
"groups": [
12721266
{
12731267
"group": "Getting started",
12741268
"pages": ["index", "quickstart"]
@@ -1288,21 +1282,19 @@ See [Themes](themes) for more information.
12881282
]
12891283
},
12901284
{
1291-
"dropdown": "Changelog",
1285+
"tab": "Changelog",
12921286
"icon": "history",
1293-
"description": "Updates and changes",
12941287
"pages": ["changelog"]
12951288
}
12961289
]
12971290
},
12981291
{
12991292
"language": "es",// [!code highlight]
1300-
"dropdowns": [
1293+
"tabs": [
13011294
{
1302-
"dropdown": "Documentación",
1295+
"tab": "Documentación",
13031296
"icon": "book",
1304-
"description": "Cómo usar el producto de Example Co.",
1305-
"pages": [
1297+
"groups": [
13061298
{
13071299
"group": "Comenzando",
13081300
"pages": ["es/index", "es/quickstart"]
@@ -1322,9 +1314,8 @@ See [Themes](themes) for more information.
13221314
]
13231315
},
13241316
{
1325-
"dropdown": "Changelog",
1317+
"tab": "Changelog",
13261318
"icon": "history",
1327-
"description": "Actualizaciones y cambios",
13281319
"pages": ["es/changelog"]
13291320
}
13301321
]

0 commit comments

Comments
 (0)