Skip to main content
Version: v9.1.0-alpha.2

ontario-search-result-item

Use ontario-search-result-item to render a semantic option row for search suggestions.

Example

<ontario-search-result-item label="Toronto" description="City in Ontario" value="Toronto"></ontario-search-result-item>

Example with custom slotted content

<ontario-search-result-item value="Toronto">
<div>
<strong>Toronto</strong>
<p>Population: 2.9M</p>
</div>
</ontario-search-result-item>

Overview

Ontario Search Result Item renders a semantic option row for search suggestions.

For component guidance, see:

Properties

PropertyAttributeDescriptionTypeDefault
activeactiveMarks the option as active during keyboard navigation (parent-managed).boolean | undefinedfalse
descriptiondescriptionOptional secondary text shown below the label.string | undefinedundefined
disableddisabledMarks the option as disabled and non-interactive.boolean | undefinedfalse
hrefhrefOptional URL to represent a navigable search result.string | undefinedundefined
labellabelPrimary text for the suggestion row.string | undefinedundefined
languagelanguageOptional language prop to align with component API conventions."en" | "fr" | undefined'en'
segmentssegmentsOrdered label segments used to render matched input text and completion text.Segment[] | undefinedundefined
selectedselectedMarks the option as selected (parent-managed).boolean | undefinedfalse
valuevalueOptional value used by parent components during selection. Falls back to label when not set.string | undefinedundefined

Events

EventDescriptionType
itemSelectedEmitted when a non-disabled option is selected via click.CustomEvent<{ label?: string | undefined; value?: string | undefined; href?: string | undefined; }>

Dependencies

Used by

Graph


Built with StencilJS