@hoststack/ui / components / IPlaces
Defined in: components.ts:470
Places component props - Google Places autocomplete input with dropdown
<Places
name="location"
placeholder="Search for places..."
onPlaceSelect={(place) => console.log('Selected place:', place)}
apiKey={process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}
/>Omit<IInput,"submitFunction"|"submit"|"reveal"|"copy"|"reset">
optionalcss:CSS
Defined in: components.ts:420
Custom CSS styles
optionalerror:boolean
Defined in: components.ts:422
Whether the input is in an error state
optionalerrorMessage:string
Defined in: components.ts:424
Error message to display below the input
optionalid:string
Defined in: components.ts:426
HTML id attribute for the input
optionallisten:boolean
Defined in: components.ts:428
Whether to listen for form validation events
optionalloading:boolean
Defined in: components.ts:430
Whether to show a loading state
name:
string
Defined in: components.ts:432
Name attribute for the input (required)
optionalresetFunction: () =>void
Defined in: components.ts:436
Function to call when reset button is clicked
void
Omit.resetFunction
optionalsubmitValid: (value) =>boolean
Defined in: components.ts:444
Function to validate input value before submit
string
boolean
Omit.submitValid
optionalsuccess:boolean
Defined in: components.ts:446
Whether the input is in a success state
optionalsuccessMessage:string
Defined in: components.ts:448
Success message to display below the input
optionalwarning:boolean
Defined in: components.ts:450
Whether the input is in a warning state
optionalwarningMessage:string
Defined in: components.ts:452
Warning message to display below the input
optionalwidth:string|number
Defined in: components.ts:454
Width of the input field
Omit.width
apiKey:
string
Defined in: components.ts:473
Google Maps API key for Places API
optionalonPlaceSelect: (place) =>void
Defined in: components.ts:475
Callback when a place is selected from the dropdown
string
string
{ main_text: string; secondary_text: string; }
string
string
string[]
void
optionalcountries:string[]
Defined in: components.ts:485
Country restrictions (ISO 3166-1 Alpha-2 country codes)
optionaltypes:string[]
Defined in: components.ts:487
Types of places to search for
optionaldropdownCSS:CSS
Defined in: components.ts:489
Custom CSS styles for the dropdown
optionaldropdownWidth:string|number
Defined in: components.ts:491
Width of the dropdown
optionaldropdownHeight:string|number
Defined in: components.ts:493
Height of the dropdown