diff --git a/fern/products/docs/pages/component-library/default-components/tooltips.mdx b/fern/products/docs/pages/component-library/default-components/tooltips.mdx index 0829c8a47..91e982556 100644 --- a/fern/products/docs/pages/component-library/default-components/tooltips.mdx +++ b/fern/products/docs/pages/component-library/default-components/tooltips.mdx @@ -1,24 +1,16 @@ --- -title: 'Tooltips' -description: 'Add interactive tooltips to your documentation.' +title: Tooltips +description: Add interactive tooltips to your documentation. --- The Tooltips component provides a way to display additional information when users hover over an element. This is particularly useful for providing context or explanations without cluttering the interface. -## Tooltips in CodeBlocks +## Tooltips in code -## Properties - - - Key-value pairs where the values are displayed in your code blocks. - - - - Key-value pairs where the values are displayed in the tooltips. The Key for `tooltips` must match the Key for `data`. - - - -## Examples +The code tooltip component allows you to provide contextual information for variables and +values within your code examples. When users hover over highlighted code, they +can see explanations, documentation links, or additional context without leaving +the code example. @@ -138,4 +130,52 @@ const api = axios.create({ -## Tooltips for Text +### Properties + + + Key-value pairs where the values are displayed in your code blocks. + + + + Key-value pairs where the values are displayed in the tooltips. The Key for `tooltips` must match the Key for `data`. + + +## Tooltips for text + +The text tooltip component allows you to provide contextual information for any text element in your documentation. When users hover over them, they can see definitions or additional context without leaving the current page. + + + +Documentation becomes more interactive when you add tooltips to key terms. You can include Rich Content

Supports HTML formatting, external links, and inline code} side="right">rich content
with custom positioning for more detailed explanations. +
+ +```tsx +Documentation becomes more interactive when you add tooltips to key terms. + +You can include + Rich Content +

+ Supports HTML formatting, external links, and inline code + + } + side="right" +>rich content
with custom positioning for more detailed explanations. +``` +
+
+ +### Properties + + + The content to display in the tooltip. Can be a simple string or React component for more complex content. + + + + Controls which side of the element the tooltip appears on. + + + + The distance in pixels between the tooltip and the trigger element. + \ No newline at end of file