The @fern-api/search-widget package provides a standalone React component that brings Ask Fern’s AI-powered search to any React application outside of your Fern Docs site. Embed a search modal in your dashboard, marketing site, or internal tool so users can find relevant documentation without leaving their workflow.
Search widget embedded in a dashboard. Try the live demo or browse the demo source.
All standard HTML button attributes are also supported and forwarded to the trigger button.
The URL of your published Fern Docs site (for example, https://docs.example.com). Include the full path if your docs aren’t at the root (for example, https://buildwithfern.com/learn).
Language code for the search interface.
Icon element to display in the button.
CSS class names for the trigger button.
Inline styles for the trigger button.
Button content (text, icons, etc.).
Disables the button.
Additional click handler that runs before the modal opens.