snippets/ folder.
Using a snippet
The DRY (Don’t Repeat Yourself) principle applies to documentation. When the same content appears in multiple places, create a custom snippet to keep it in sync. All snippets are placed in the rootsnippets/ folder. For creation and usage details, see the Mintlify reusable snippets documentation.
Using a component
To use a custom component, import it into the MDX file and render it as a JSX tag. Tags start with an uppercase letter matching the name in the import statement:some/page.mdx
Built-in components
Mintlify provides built-in components for common documentation use cases. These components are available globally without needing to import anything.Use sparingly
Keep formatting as simple as possible. Avoid components when a paragraph or series of paragraphs communicates the same intent and information without them.Steps
Display sequential instructions in a numbered format.
Code groups
Display multiple code examples with a toggle.
Cards
Highlight content with customizable containers and icons. Prefer regular ordered or unordered Markdown lists and resort to cards only when the relevant links and content should stand out.
Columns
Arrange <Card> components in responsive layouts.
Accordions
Expandable sections for progressive disclosure of content.
Expandables
Show and hide detailed content on demand. Append the expandable keyword to the opening part of a code block to collapse large examples.
Badge
Add inline labels and status indicators for outdated or deprecated items. Otherwise, avoid this component.
Tooltips
Display additional information on hover without going too deep. Link to the glossary, a detailed explanation page, or a reference page instead.
Fields
Display parameter and property definitions, configuration options, or object fields.
Responses
Show <ResponseField> that describes API response structures and fields.
Examples
Show <RequestExample> and <ResponseExample> side by side.
Mermaid diagrams
Use code blocks with Mermaid.js syntax to create flowcharts, sequence diagrams, and more.
Do not use
These components have better alternatives:<Callout>- use the custom<Aside>component.<Frame>- use the custom<Image>component.<View>- use<CodeGroup>, organize content in sub-headers, or create distinct pages per environment or language.<Tile>- use<Card>.<Icon>- do not use unless icons in other components or code blocks are insufficient in the given case.
<Banner>- reserved for special occasions and public releases.<Update>- the documentation does not contain changelogs.
Custom components
TON documentation includes custom components built for various needs. See items on the left navigation panel within the “Components and snippets” group under the “Contribute” section, such as: Aside, Image, etc.Styling
Mintlify supports Tailwind CSS v3 for styling HTML elements and any components or snippets from thesnippets/ folder.
Related resources:
- Styling with Tailwind CSS in the Mintlify documentation
- Tailwind CSS v3 documentation
- Unofficial Tailwind CSS v3 cheatsheet