Name, address, phone
Renders NapBlock and JsonLd from @bison-lab/ui. The phoneE164 field is separate from the displayed number because it, and only it, becomes the tel: href and the structured data’s telephone. A prettified string can never silently become an unreachable link. A department without a name and an E.164 number is dropped rather than published. In the admin the departments are edited with the kit items list (ITEMS_FIELD): each closed row reads as the department with its displayed number, or the E.164 number while that is empty, and the last department cannot be deleted.
The block emits schema.org LocalBusiness by default. The shipped sample turns that off, because a preview must not put a fictional business into a site’s structured data.
import { NapBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:NapBlockimport { NapBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:nap: NapBlockRenderer,Fields
Section titled “Fields”| Field | Type | Notes |
|---|---|---|
businessName * | text | Labelled “Business name”. |
businessType * | text | schema.org type, e.g. "MedicalBusiness", "Chiropractor", "LocalBusiness". Default "LocalBusiness". |
address | group | |
address.streetAddress * | text | |
address.addressLocality * | text | Labelled “City”. |
address.addressRegion * | text | Labelled “State or region”. |
address.postalCode * | text | |
address.addressCountry | text | ISO 3166-1 alpha-2, e.g. US. Default "US". |
departments * | array | A single-location business has one entry, usually named after the business. At least 1 row. Opens with 1 empty row; the admin field will not remove below that. |
departments[].name * | text | |
departments[].departmentType | text | schema.org type for this department. Falls back to the business type. |
departments[].phoneE164 * | text | Labelled “Phone (E.164)”. Dialable form, e.g. "+15551234567". This is what the tel: link and the structured data use. |
departments[].phoneDisplay | text | Labelled “Phone (as displayed)”. Optional. US numbers are formatted automatically when this is empty. |
url | text | Canonical URL for the business. Optional. |
showName | checkbox | Turn off when a heading above the block already names the business. Default true. |
headingLevel | select | Keeps the page's heading order intact. One of h2, h3, h4. Default "h2". |
emitJsonLd | checkbox | Labelled “Emit structured data”. Adds a schema.org LocalBusiness script. Turn off if the page emits its own. Default true. |
settings | group | Labelled “Block Settings”. |
settings.background | select | Labelled “Background”. The surface this section sits on. Page is the plain page background. One of page, card, muted, color, gradient. Default "page". |
settings.backgroundColor | text | Labelled “Color”. |
settings.backgroundColorDark | text | Labelled “Dark mode color”. |
settings.gradientTo | text | Labelled “Gradient end”. |
settings.gradientToDark | text | Labelled “Dark mode gradient end”. |
settings.gradientDirection | text | Labelled “Gradient direction”. |
settings.spacing | select | Labelled “Spacing”. The air above and below this section. Default is the block's own padding; Compact and Spacious replace it. This is the band, not the site-wide spacing in Theme → Appearance. One of compact, default, spacious. Default "default". |
settings.anchor | text | Labelled “Anchor”. In-page links can target this section. Leave blank for none. |
settings.hidden | checkbox | Labelled “Hidden”. The section stays in the editor and is left off the page. Default false. |
* required.