Search modal with AI chat
SearchModal renders a trigger button that opens a modal over the page, combining keyword search with AI chat. It’s one of the two components in the @fern-api/search-widget package, which covers the prerequisites and the Content Security Policy the widget needs.
The SearchModal component embedded in a dashboard. Try the live demo or browse the demo source.
Setup
Properties
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 interface.
Icon element to display in the trigger button.
Trigger button content (text, icons, etc.).
CSS class names for the trigger button.
Inline styles for the trigger button.
Disables the button.
Additional handler that runs before the modal opens.