Skip to content

Name, address, phone

Name, address, phone · sample rowOpen ↗

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.

payload.config.ts / collections
import { NapBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:
NapBlock
blocks/registry.ts
import { NapBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:
nap: NapBlockRenderer,
FieldTypeNotes
businessName *textLabelled “Business name”.
businessType *textschema.org type, e.g. "MedicalBusiness", "Chiropractor", "LocalBusiness". Default "LocalBusiness".
addressgroup
address.streetAddress *text
address.addressLocality *textLabelled “City”.
address.addressRegion *textLabelled “State or region”.
address.postalCode *text
address.addressCountrytextISO 3166-1 alpha-2, e.g. US. Default "US".
departments *arrayA 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[].departmentTypetextschema.org type for this department. Falls back to the business type.
departments[].phoneE164 *textLabelled “Phone (E.164)”. Dialable form, e.g. "+15551234567". This is what the tel: link and the structured data use.
departments[].phoneDisplaytextLabelled “Phone (as displayed)”. Optional. US numbers are formatted automatically when this is empty.
urltextCanonical URL for the business. Optional.
showNamecheckboxTurn off when a heading above the block already names the business. Default true.
headingLevelselectKeeps the page's heading order intact. One of h2, h3, h4. Default "h2".
emitJsonLdcheckboxLabelled “Emit structured data”. Adds a schema.org LocalBusiness script. Turn off if the page emits its own. Default true.
settingsgroupLabelled “Block Settings”.
settings.backgroundselectLabelled “Background”. The surface this section sits on. Page is the plain page background. One of page, card, muted, color, gradient. Default "page".
settings.backgroundColortextLabelled “Color”.
settings.backgroundColorDarktextLabelled “Dark mode color”.
settings.gradientTotextLabelled “Gradient end”.
settings.gradientToDarktextLabelled “Dark mode gradient end”.
settings.gradientDirectiontextLabelled “Gradient direction”.
settings.spacingselectLabelled “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.anchortextLabelled “Anchor”. In-page links can target this section. Leave blank for none.
settings.hiddencheckboxLabelled “Hidden”. The section stays in the editor and is left off the page. Default false.

* required.