Overview
The location element provides a Google Places search interface for users to select a location. It stores the full place data including coordinates, name, address, and optional metadata like ratings and photos.Properties
Validation
PlaceValue Structure
The selected location value has this structure:Example
Basic Location
linkapp.config.ts
With Custom Placeholder
linkapp.config.ts
Usage in Layout
app/expanded.tsx
Using with Arrays
Location elements work inside arrays for collecting multiple locations:linkapp.config.ts
app/expanded.tsx
Common Patterns
Business location:The actual Google Places picker is rendered in the Linktree admin (frontyard).
The dev server shows a preview placeholder.
Best Practices
- Provide clear descriptions explaining what type of location is expected
- Use custom placeholders to guide users on what to search for
- Consider using arrays when users need to add multiple locations
- Handle optional fields - rating, photos, etc. may not be available for all places
Next Steps
Text Inputs
Text, textarea, URL, and number inputs
Advanced Elements
Arrays, integrations, and conditional display
Selection Controls
Select, radio, and checkbox elements
Back to Reference
Return to settings reference overview