Hiding navigation elements
Use thehidden property to remove navigation elements from view while keeping them in your configuration.
Hide pages
Hide individual pages from navigation by settinghidden: true in the page’s frontmatter:
Hide groups
Hide entire groups of pages by setting thehidden property in your docs.json:
Hide tabs
Hide tabs from the top navigation bar:Hide anchors
Hide anchors from the sidebar:Hide dropdowns
Hide dropdown menus:Hiding API documentation sections
Control visibility of API playground and documentation elements.Hide the API playground
Hide the interactive API playground globally by settingdisplay to none in your docs.json:
display:
interactive- Show the full interactive playground (default)simple- Show a copyable endpoint without the playgroundnone- Hide the playground entirely
Hide playground on specific pages
Override the global playground setting for individual API pages using frontmatter:Hide playground for unauthenticated users
Show the playground only to authenticated users:playground is set to auth:
- Authenticated users see the interactive playground
- Unauthenticated users see no playground
groups property to restrict access to specific user groups:
Hide specific API sections
Use custom CSS to hide specific sections of API documentation. Create astyle.css file in your repository:
API section selectors may vary. Use your browser’s inspect element tool to identify the correct selectors for the sections you want to hide.
Hiding the sidebar
Control sidebar visibility on specific pages using themode frontmatter property.
Hide sidebar on a single page
Use thecenter mode to hide both the sidebar and table of contents:
custom mode for a minimal layout with only the top navbar:
default- Standard layout with sidebar and table of contentswide- Hides table of contents for wider contentcenter- Hides sidebar and table of contentscustom- Minimal layout with only the navbar
Hide sidebar globally with CSS
Create astyle.css file to hide the sidebar across all pages:
Hiding the Mintlify badge
The “Powered by Mintlify” badge appears in the footer on free plans. This badge is automatically removed on paid plans. To remove the badge, upgrade to a paid plan through your Mintlify dashboard.Attempting to hide the Mintlify badge with custom CSS on free plans violates the terms of service.
Hiding other UI components
Use custom CSS to hide additional UI elements. Create astyle.css file in your repository and target specific elements using their identifiers or selectors.
Common elements to hide
Available identifiers
Mintlify provides identifiers for common UI elements. Use inspect element in your browser to find the correct identifier for the element you want to hide.Common identifiers
Common identifiers
- Banner:
banner - Footer:
footer - Header:
header - Navbar:
navbar - Sidebar:
sidebar - SidebarContent:
sidebar-content - TableOfContents:
table-of-contents - Pagination:
pagination - SearchBarEntry:
search-bar-entry - FeedbackToolbar:
feedback-toolbar - PageContextMenu:
page-context-menu
Hide elements on specific pages
Use page-specific CSS by adding a class to your page and targeting it in your stylesheet:Best practices
Use built-in properties first
Use built-in properties first
Always prefer built-in properties like
hidden, mode, and playground over custom CSS. Built-in properties are more maintainable and less likely to break with platform updates.Test across themes
Test across themes
If you use custom CSS to hide elements, test your documentation across different themes to ensure the selectors work consistently.
Document your customizations
Document your customizations
Keep a record of which elements you’ve hidden and why. This helps when troubleshooting or updating your documentation.
Consider user experience
Consider user experience
Hiding navigation elements can make it harder for users to discover content. Ensure users have alternative ways to find hidden pages if needed.
Use inspect element
Use inspect element
When targeting elements with custom CSS, use your browser’s inspect element tool to find the correct identifiers and selectors.