Skip to content

React

Prop Type Description Optional
mostSearched string[] List of predefined search prompts displayed as quick suggestions for users. ✅
title string Title displayed at the top of the component. ✅
text string Default text displayed inside the input to guide the user before typing. ✅
searchHint string Helper test displayed below the search input to suggest what users can type. ✅
loadingMessage string Message displayed while the system is generating or retrieving the answer. ✅
brand Brand Brand: e.g., Lexus, Toyota ❌
root string The homepage for the current country used as the base context for the component. The Search AI endpoint provides content based on this root. ❌
import { SearchAi } from '@tmedxp/aem-react-components';
const SearchAiExample = () => (
<SearchAi
mostSearched={[
'Can I have a full check-up done on my car?',
'Where can I request a drive test?',
'Can I convert my car into a hybrid?',
]}
title="Can we help you search anything?"
text="Please enter your search query"
searchHint="Not sure what to type? Start with a keyword."
loadingMessage="Loading your answer"
brand="Lexus"
root="content/toyota/sweden/sv"
/>
);
export { SearchAiExample };