nuxt-x-schema
LocalBusiness
Schema.org LocalBusiness JSON-LD component for brick-and-mortar business structured data.
LocalBusiness
The XSchemaLocalBusiness component injects a <script type="application/ld+json"> tag for local business structured data. No visible output — SEO only.
Components
<XSchemaLocalBusiness />
Use on pages for physical businesses: restaurants, clinics, shops, offices. Enables rich results including maps, hours, and contact info in Google Search.
<XSchemaLocalBusiness
name="Acme Coffee"
business-type="CafeOrCoffeeShop"
url="https://acmecoffee.com"
:address="{
streetAddress: '123 Main St',
addressLocality: 'Seattle',
addressRegion: 'WA',
postalCode: '98101',
addressCountry: 'US'
}"
telephone="+12065551234"
/>
Props
| Prop | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Business name |
businessType | String | Yes | Schema.org business type (e.g. Restaurant, MedicalClinic) |
url | String | Yes | Business website URL |
address | PostalAddress | Yes | Address object: { streetAddress, addressLocality, addressRegion, postalCode, addressCountry } |
telephone | String | No | Phone number |
email | String | No | Contact email |
image | String | No | Business image URL |
description | String | No | Business description |
openingHoursSpecification | Record<string,any>[] | No | Array of opening hours objects |
aggregateRating | AggregateRating | No | Rating object { ratingValue, reviewCount } |
priceRange | String | No | Price range indicator (e.g. $$) |
sameAs | String[] | No | Social profile and directory URLs |
AI Context
component: XSchemaLocalBusiness
package: "@xenterprises/nuxt-x-schema"
output: JSON-LD script tag in <head>
use-when: Adding LocalBusiness structured data for physical businesses (restaurants, clinics, shops)
place: In page-level components (pages/ or layouts/), NOT in shared headers
notes:
- Renderless component — no visible DOM output; purely SEO metadata
- Injects JSON-LD server-side via useHead — SSR-safe, visible to crawlers on first paint
- businessType must be a valid Schema.org LocalBusiness subtype
- address object: { streetAddress, addressLocality, addressRegion, postalCode, addressCountry }
