Skip to content

Fill gaps from assistant conversations: snippet identifier rules#6727

Merged
ethanpalm merged 5 commits into
mainfrom
mintlify/2af918c1
Jul 24, 2026
Merged

Fill gaps from assistant conversations: snippet identifier rules#6727
ethanpalm merged 5 commits into
mainfrom
mintlify/2af918c1

Conversation

@mintlify

@mintlify mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Clarify the naming rules for the identifier used when importing a reusable snippet, addressing recurring assistant questions about which identifiers are valid.

Changes

  • Add a note to create/reusable-snippets.mdx explaining that the import name must be a valid JSX component identifier (PascalCase, uppercase first letter) and that lowercase names are treated as HTML elements.

Context

Assistant conversations this week showed users asking what identifiers work when inserting a snippet. The existing page shows PascalCase in examples but does not state the requirement explicitly.


Note

Low Risk
Documentation-only edits to MDX guides; no runtime, auth, or data paths affected.

Overview
Documents a gap in the reusable snippets guide: snippet tags must use an uppercase-first identifier (e.g. MySnippet) so MDX treats them as components, not lowercase HTML/custom elements like <mySnippet />.

The new note sits under Import snippets into pages in create/reusable-snippets.mdx, with matching copy in es, fr, and zh (locales also mention PascalCase as convention where the English page does not). es, fr, and zh also get a trailing newline fix on the React import example code fence.

Reviewed by Cursor Bugbot for commit df4b49b. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jul 24, 2026, 4:15 PM

@mintlify

mintlify Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jul 24, 2026, 4:15 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread create/reusable-snippets.mdx Outdated
Comment thread es/create/reusable-snippets.mdx Outdated
Comment thread fr/create/reusable-snippets.mdx Outdated
Comment thread zh/create/reusable-snippets.mdx Outdated
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
@ethanpalm
ethanpalm merged commit 71fa4f4 into main Jul 24, 2026
4 checks passed
@ethanpalm
ethanpalm deleted the mintlify/2af918c1 branch July 24, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants