Style with Tailwind CSS
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 visibility
style prop instead.
Add custom CSS
Add CSS files to your repository to apply their defined class names and make them available in all of your MDX files. The references and styling of common elements are subject to change. Use custom styling with caution since breaking changes may occur in future updates. For example, you can add the followingstyle.css file to customize the styling of the navbar and footer.
- ID selectors: unique page-level elements targeted with
#value { }in CSS - Element selectors: component and layout elements targeted with
value { }in CSS (no#or.prefix)
ID selectors
Each ID appears once per page. Use these as#value in CSS. For example, #navbar { background: red; }.
Page layout
Page layout
#body-contentβ Outermost wrapper for the page body.#content-areaβ Primary content area, excluding the sidebar and table of contents.#contentβ Inner content element within the content area.#headerβ Page-level header element.#bannerβ Announcement banner displayed above the navbar.#footerβ Page footer. Also targetable as an element selector:footer.#page-titleβ The<h1>heading at the top of each page.#paginationβ Bottom pagination bar with previous and next page links.#panelβ Floating panel overlay. Also targetable as an element selector:panel.#background-colorβ Page background color element.
Table of contents
Table of contents
#table-of-contentsβ Table of contents panel on the right side of the page.#table-of-contents-layoutβ Layout wrapper for the table of contents.#table-of-contents-contentβ Scrollable content within the table of contents.
Search
Search
#search-bar-entryβ Search bar trigger in the topbar.#search-bar-entry-mobileβ Search bar trigger on mobile.#search-inputβ Text input field within the search modal.
AI assistant
AI assistant
#assistant-entryβ AI assistant button in the topbar.#assistant-entry-mobileβ AI assistant button on mobile.#chat-assistant-sheetβ AI assistant chat panel.#chat-assistant-textareaβ Text input within the AI assistant panel.
API reference
API reference
#request-exampleβ Request example panel in the API playground.#response-exampleβ Response example panel in the API playground.#api-playground-inputβ Input section of the API playground.#endpoints-menu-triggerβ Button that opens the endpoint selector dropdown.
Code blocks
Code blocks
#ask-assistant-code-block-buttonβ βAsk Assistantβ button that appears on code blocks.#code-snippet-feedback-buttonβ Feedback button on code snippets.#code-snippet-feedback-textareaβ Text area within the code snippet feedback form.
Feedback
Feedback
#feedback-thumbs-upβ Thumbs-up feedback button at the bottom of a page.#feedback-thumbs-downβ Thumbs-down feedback button at the bottom of a page.#feedback-formβ Feedback form shown after a thumbs-down response.#feedback-form-inputβ Text input within the feedback form.#feedback-form-cancelβ Cancel button within the feedback form.#feedback-form-submitβ Submit button within the feedback form.
Localization
Localization
#localization-select-triggerβ Button that opens the language selector.#localization-select-contentβ Dropdown content of the language selector.#localization-select-itemβ Individual language option within the selector.
Changelog
Changelog
#changelog-filtersβ Filter controls on a changelog page.#changelog-filters-contentβ Content area within the changelog filter panel.
Multi-view
Multi-view
#multi-view-dropdownβ Dropdown for switching between documentation views.
Text selection
Text selection
#text-selection-tooltipβ Tooltip that appears when you select text on a page.#text-selection-tooltip-buttonβ Action button within the text selection tooltip.
Element selectors
Multiple instances of these elements can appear on a page. Use these asvalue in CSS. For example, accordion { border: 1px solid red; }.
Content components
Content components
accordionβ Collapsible accordion item.accordion-groupβ Wrapper grouping multiple accordions.calloutβ Callout block (Note, Warning, Tip, etc.).cardβ Individual card element.card-groupβ Wrapper grouping multiple cards. Deprecated in favor ofcolumns, but preserved for backward compatibility.columnsβ Multi-column layout wrapper.code-blockβ Code block element.code-block-iconβ Icon displayed in a code block header.code-groupβ Tabbed group of code blocks.expandableβ Expandable section element.frameβ Frame wrapper for images or embedded content.iconβ Inline icon element.mermaidβ Mermaid diagram wrapper.stepβ Individual step within a steps sequence.stepsβ Numbered steps container.tab-iconβ Icon displayed within a tab.tabsβ Tabbed content container.tileβ Tile component element.tooltipβ Tooltip element.updateβ Changelog update entry.
Page layout
Page layout
mdx-contentβ Rendered MDX content area.panelβ Floating panel component. Also targetable as an ID selector:#panel.eyebrowβ Small label displayed above a page title.linkβ Anchor link element.breadcrumb-listβ Breadcrumb navigation list.breadcrumb-itemβ Individual breadcrumb item.
Topbar dropdown
Topbar dropdown
nav-dropdown-triggerβ Button that opens a navigation dropdown.nav-dropdown-contentβ Content container for a navigation dropdown.nav-dropdown-itemβ Individual item within a navigation dropdown.nav-dropdown-item-text-containerβ Text wrapper within a dropdown item.nav-dropdown-item-titleβ Title text within a dropdown item.nav-dropdown-item-descriptionβ Description text within a dropdown item.nav-dropdown-item-iconβ Icon within a dropdown item.
Products selector
Products selector
nav-dropdown-products-selector-triggerβ Button that opens the products selector dropdown.nav-dropdown-products-selector-contentβ Content container for the products selector.nav-dropdown-products-selector-itemβ Individual product in the selector.nav-dropdown-products-selector-item-titleβ Title of a product selector item.nav-dropdown-products-selector-item-descriptionβ Description of a product selector item.nav-dropdown-products-selector-item-iconβ Icon of a product selector item.
Table of contents
Table of contents
tocβ Table of contents container.toc-itemβ Individual heading entry in the table of contents.
Pagination
Pagination
pagination-prevβ Previous page link in the pagination bar.pagination-nextβ Next page link in the pagination bar.pagination-titleβ Page title shown in the pagination bar.
API reference
API reference
api-sectionβ Full section for a single API endpoint.api-section-headingβ Heading area for an API endpoint section.api-section-heading-titleβ Title within an API endpoint section heading.api-section-heading-subtitleβ Subtitle within an API endpoint section heading.fieldβ Parameter or property field in the API reference.option-dropdownβ Dropdown for selecting between API options.tryit-buttonβ βTry itβ button that opens the API playground.method-pillβ HTTP method badge (GET, POST, etc.) on an endpoint.method-nav-pillβ HTTP method badge shown in the sidebar navigation.promptβ Prompt component in the API reference.
AI assistant
AI assistant
chat-assistant-sheetβ AI assistant panel container.chat-assistant-sheet-headerβ Header of the AI assistant panel.chat-assistant-sheet-contentβ Content area of the AI assistant panel.chat-assistant-inputβ Text input within the AI assistant panel.chat-assistant-floating-inputβ Floating input variant of the AI assistant.chat-assistant-send-buttonβ Send button in the AI assistant panel.chat-assistant-disclaimer-textβ Disclaimer text displayed in the AI assistant panel.chat-assistant-payload-itemβ Individual message or result item in the assistant panel.starter-question-textβ Suggested starter question shown in an empty assistant panel.
Feedback
Feedback
feedback-toolbarβ Toolbar containing page feedback controls.contextual-feedback-containerβ Container for contextual inline feedback.contextual-feedback-formβ Inline contextual feedback form.contextual-feedback-form-titleβ Title of the contextual feedback form.contextual-feedback-inputβ Text input within the contextual feedback form.contextual-feedback-buttonβ Action button within the contextual feedback form.contextual-feedback-form-submit-buttonβ Submit button for the contextual feedback form.
Code snippet feedback
Code snippet feedback
code-snippet-feedback-popover-contentβ Popover content for code snippet feedback.code-snippet-feedback-formβ Feedback form for a code snippet.code-snippet-feedback-textareaβ Text area within the code snippet feedback form.code-snippet-feedback-form-titleβ Title of the code snippet feedback form.code-snippet-feedback-form-descriptionβ Description text in the code snippet feedback form.code-snippet-feedback-form-submit-buttonβ Submit button for the code snippet feedback form.
Authentication
Authentication
login-linkβ Link that initiates the login flow.logout-linkβ Link that initiates the logout flow.
Multi-view
Multi-view
multi-view-itemβ Individual view option in a multi-view switcher.multi-view-dropdownβ Dropdown for selecting between multiple views.multi-view-dropdown-triggerβ Button that opens the multi-view dropdown.multi-view-dropdown-contentβ Content area of the multi-view dropdown.multi-view-dropdown-itemβ Individual item within the multi-view dropdown.
Directory
Directory
directoryβ Root container for a directory page.directory-groupβ Group of related pages within a directory.directory-pageβ Individual page entry in a directory.directory-cardβ Card-style page entry in a directory.
404 page
404 page
not-found-containerβ Root container of the 404 page.not-found-status-codeβ Status code display on the 404 page.not-found-titleβ Title heading on the 404 page.not-found-descriptionβ Description text on the 404 page.not-found-recommended-pages-listβ List of recommended pages shown on the 404 page.not-found-recommended-page-linkβ Individual link in the recommended pages list.
Color
Color
colorβ Color swatch element.color-rowβ Row grouping color swatches.color-itemβ Individual color item within a color row.
Tree
Tree
treeβ File tree container.tree-folderβ Folder entry within a file tree.tree-fileβ File entry within a file tree.
Data attributes
Data attributes
Some elements expose data attributes you can use as CSS selectors.Active state (
data-active):nav-dropdown-item[data-active]β Active item in a nav dropdown.mobile-nav-tabs-item[data-active]β Active tab in the mobile nav.sidebar-group[data-active]β Active sidebar group.#sidebar-content li[data-active]β Active sidebar link..nav-tabs-item[data-active]β Active top nav tab. Only applies to simple tabs; tabs with dropdown menus do not receivedata-active. Note the leading.: this targets a class on a standard<a>element, unlike most other components which use custom element names.toc-item[data-active]β Active table of contents item.toc-item[data-active-deepest]β Deepest active table of contents item. Only present on the exact heading currently in view, unlikedata-activewhich is also set on its parent headings.
data-component-name):Use data-component-name to target specific UI components with a stable selector that persists if internal class names change.[data-component-name="mermaid-container"]β Mermaid diagram wrapper, including the zoom controls overlay.[data-component-name="mermaid-controls-wrapper"]β Mermaid zoom and pan controls.[data-component-name="primary-header-button"]β Primary header button. Sequoia theme only.[data-component-name="theme-toggle"]β Theme toggle.
data-component-part):Use data-component-part to target sub-elements within a component.[data-component-part="contact-support-button"]β The<a>wrapper around the contact support link in the assistant panel.[data-component-part="contact-support-icon"]β The<span>wrapping the icon.[data-component-part="contact-support-text"]β The<p>element containing the label.
[data-badge]β Any badge element.[data-badge][data-color="blue"]β Badge filtered by color.[data-badge][data-size="sm"]β Badge filtered by size.
data-current-path):Use data-current-path to style custom CSS on specific pages or subpaths.html[data-current-path="/"]β Matches the root page.html[data-current-path="/quickstart"]β Matches a specific page.html[data-current-path^="/api-reference/"]β Matches any page under a section.
Custom JavaScript
Custom JS lets you add custom executable code globally. It is the equivalent of adding a<script> tag with JS code into every page.
Mintlify includes any .js file inside your content directory on every page of your documentation site. Custom JavaScript files run after the page becomes interactive. You cannot scope them to specific pages. For example, you can add the following ga.js file to enable Google Analytics across the entire documentation.