Skip to main content
Use the Visibility component to show different content to different audiences on the same page. You can target humans reading your site, AI agents processing the Markdown output, or readers based on their sign-in state and user groups. This lets you customize information for each audience without maintaining separate pages. On your published site, content marked for="humans" renders normally and content marked for="agents" is hidden. In Markdown page views (.md URLs), the opposite applies. Agent content renders in the Markdown output and human-only content does not. The same rules apply to the llms-full.txt file.

Example

You are viewing this content in web.This content displays normally on standard pages of your site.Use it for a step like: Click the Get started button in the top-right corner to create your account.In this example, UI-oriented instructions appear on the standard page. View the Markdown version of this page to see the API-oriented instructions for agents.

Show content by sign-in state or group

If your site uses authentication, you can show content based on whether a reader is signed in or which groups they belong to.
  • signed-in content renders only for readers with an active session.
  • signed-out content renders only for readers who are not signed in.
  • groups content renders only for signed-in readers who belong to at least one of the listed groups.
Markdown page views and llms-full.txt are the same for every reader, so agents always get the signed-out view. Mintlify removes signed-in and groups content from Markdown output and includes signed-out content. To check these rules locally, run mint dev --signed-in or mint dev --groups. Without either flag, the local preview shows the signed-out view.
Sign-in and group rules hide content in the browser only. Mintlify still sends the hidden content to every reader’s browser. To restrict access to sensitive content, put it on a separate page and use the groups frontmatter property.

Properties

string | object
required
The audience for the wrapped content. Must be one of:
  • humans: Content visible on the web and excluded from Markdown output.
  • agents: Content hidden on the web and included in Markdown output.
  • signed-in: Content visible on the web to signed-in readers and excluded from Markdown output.
  • signed-out: Content visible on the web to signed-out readers and included in Markdown output.
  • { groups: [...] }: Content visible on the web to signed-in readers in at least one of the listed groups and excluded from Markdown output.
Use a static value. Mintlify excludes content with a computed for value, such as a variable or conditional expression, from Markdown output.