diff --git a/create/text.mdx b/create/text.mdx index 6168762bc..fa1d48e32 100644 --- a/create/text.mdx +++ b/create/text.mdx @@ -22,6 +22,16 @@ Use `#` symbols to create headers of different levels: Use descriptive, keyword-rich headers that clearly indicate the content that follows. This improves both user navigation and search engine optimization. +### Custom heading IDs + +By default, anchor links are generated from the heading text. To set a custom anchor ID, add `{#your-id}` at the end of the heading: + +```mdx +## My heading {#custom-id} +``` + +This generates an anchor link of `#custom-id` instead of the default `#my-heading`. Custom IDs are useful when you want stable links that don't change if you rename a heading. + ### Disabling anchor links By default, headers include clickable anchor links that allow users to link directly to specific sections. You can disable these anchor links using the `noAnchor` prop in HTML or React headers.