Fully customize your documentation with custom CSS and JS
Use CSS to style HTML elements or add custom CSS and JavaScript to fully customize the look and feel of your documentation.
Use Tailwind CSS v3 to style HTML elements. You can control layout, spacing, colors, and other visual properties. Some common classes are:
w-full
- Full widthaspect-video
- 16:9 aspect ratiorounded-xl
- Large rounded cornersblock
, hidden
- Display controldark:hidden
, dark:block
- Dark mode visibilityTailwind CSS arbitrary values are not supported. For custom values, use the style
prop instead.
Add CSS files to your repository and their defined class names will be applied and available in all of your MDX
files.
style.css
For example, you can add the following style.css
file to customize the styling of the navbar and footer.
Mintlify has a set of common identifiers and selectors to help you tag important elements of the UI.
Use inspect element to find references to elements you’re looking to customize.
Identifiers
api-playground-input
assistant-entry
assistant-entry-mobile
banner
changelog-filters
changelog-filters-content
chat-assistant-sheet
chat-assistant-textarea
content-area
content-container
content-side-layout
footer
header
navbar-transition
navigation-items
navbar
page-context-menu
page-context-menu-button
page-title
pagination
panel
request-example
response-example
search-bar-entry
search-bar-entry-mobile
search-input
sidebar
sidebar-content
table-of-contents
table-of-contents-content
table-of-contents-layout
topbar-cta-button
Selectors
accordion
accordion-group
almond-layout
almond-nav-bottom-section
almond-nav-bottom-section-divider
nav-anchor
nav-anchors
api-section
api-section-heading
api-section-heading-subtitle
api-section-heading-title
callout
card
card-group
chat-assistant-sheet
chat-assistant-sheet-header
chat-assistant-sheet-content
chat-assistant-input
chat-assistant-send-button
code-block
code-group
mdx-content
nav-dropdown-trigger
nav-dropdown-content
nav-dropdown-item
nav-dropdown-item-text-container
nav-dropdown-item-title
nav-dropdown-item-description
nav-dropdown-item-icon
expandable
eyebrow
feedback-toolbar
field
frame
icon
link
login-link
nav-logo
mermaid
method-nav-pill
method-pill
navbar-link
nav-tag-pill
nav-tag-pill-text
option-dropdown
pagination-next
pagination-prev
pagination-title
panel
sidebar-group
sidebar-group-icon
sidebar-group-header
sidebar-title
step
steps
tab
tabs
nav-tabs
nav-tabs-item
toc
toc-item
tooltip
topbar-right-container
tryit-button
update
References and the styling of common elements are subject to change as the platform evolves. Please use custom styling with caution.
Custom JS allows you to add custom executable code globally. It is the equivalent of adding a <script>
tag with JS code into every page.
Any .js
file inside the content directory of your docs will be included in every documentation page. For example, you can add the following ga.js
file to enable Google Analytics across the entire documentation.
Please use with caution to not introduce security vulnerabilities.