Skip to main content
Mintlify pages use a standard layout by default, with a sidebar, content area, and table of contents. Customize this layout with page modes to create landing pages, feature showcases, or any page that needs a unique design. This guide covers how to use page modes, Tailwind CSS, and components to build custom layouts.

Choose a page mode

Set the mode field in your page’s frontmatter to control which UI elements appear.
ModeSidebarTable of contentsFooterTheme supportBest for
defaultYesYesYesAll themesStandard documentation pages
wideYesNoYesAll themesPages without headings or needing extra width
customNoNoNoAll themesLanding pages, marketing pages, or full-canvas layouts
frameYesNoModifiedAspen, Almond, Luma, SequoiaCustom content that still needs sidebar navigation
centerNoNoYesMint, Linden, Willow, MapleChangelogs, focused reading experiences
For landing pages, custom mode gives you the most control. It removes all UI elements except the top navbar, giving you a blank canvas to build on.
Example page frontmatter

Build a landing page

A typical landing page combines a hero section, feature cards, and calls to action.

Set up the page

Create an MDX file with custom mode:
Example landing page frontmatter

Create a hero section

Use HTML with Tailwind CSS classes to build a centered hero section:
Example hero section
Include both light and dark mode styles. Use dark: prefixed Tailwind classes to handle dark mode.

Add navigation cards

Use the Card and Columns components to create a grid of links below the hero section:
Example navigation cards

Use images with dark mode support

Show different images for light and dark mode using Tailwind’s visibility classes:
Example images with dark mode support

Use React components for interactive layouts

For reusable or interactive elements, define React components directly in your MDX file:
Example React component
Avoid using the style prop on HTML elements. It can cause a layout shift on page load. Use Tailwind CSS classes or a custom CSS file instead.

Add custom CSS

For styles that Tailwind doesn’t cover, add a CSS file to your repository. Mintlify applies CSS files site-wide, making their class names available in all MDX files.
Tailwind CSS arbitrary values (for example, w-[350px]) are not supported. Use a custom CSS file for values that Tailwind’s utility classes don’t cover.
Example custom CSS file
Then reference the class in your MDX:
Example custom CSS usage
See Custom scripts for more on custom CSS and the available CSS selectors.

Full example

Here’s a complete landing page that combines a hero section with navigation cards:
Example landing page

Tips

  • Test light and dark mode. Preview your custom layout in both light and dark mode to catch missing dark: styles.
  • Use max-w-* classes to constrain content width and keep text readable.
  • Keep it responsive. Use Tailwind’s responsive prefixes (sm:, md:, lg:) so your layout works on all screen sizes.
  • Combine modes. Use custom mode for your docs home page and default mode for everything else. You set the mode per page, so different pages can use different layouts.
  • Check for layout shifts. If elements jump on page load, replace inline style props with Tailwind classes or custom CSS.