X Enterprises
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

PropTypeRequiredDescription
nameStringYesBusiness name
businessTypeStringYesSchema.org business type (e.g. Restaurant, MedicalClinic)
urlStringYesBusiness website URL
addressPostalAddressYesAddress object: { streetAddress, addressLocality, addressRegion, postalCode, addressCountry }
telephoneStringNoPhone number
emailStringNoContact email
imageStringNoBusiness image URL
descriptionStringNoBusiness description
openingHoursSpecificationRecord<string,any>[]NoArray of opening hours objects
aggregateRatingAggregateRatingNoRating object { ratingValue, reviewCount }
priceRangeStringNoPrice range indicator (e.g. $$)
sameAsString[]NoSocial 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 }
Copyright © 2026