[**@wocart/theme v4.1.0**](../../README)

***

[@wocart/theme](../../README) / [index](../README) / SurfaceSpec

# Interface: SurfaceSpec

One surface a theme declares it can render.

`key` uses the same surface-key pattern as the page-document envelope
(`SURFACE_KEY_PATTERN` in `schemas.ts`); `label` is the editor-facing name.

## Properties

### document?

> `optional` **document?**: [`PageData`](PageData)

The theme's shipped document for this surface: what renders before the merchant saves one.

***

### hideableAreas?

> `optional` **hideableAreas?**: readonly `string`[]

The theme's areas a page of this surface may leave out (`["header",
"footer"]`): its document lists the ones it hides in `hiddenAreas`. A
landing page that sends an ad's visitor straight to its order form is
the case. Absent: every page shows every area.

***

### key

> **key**: `string`

***

### label

> **label**: [`LocalizedText`](../type-aliases/LocalizedText)

***

### max?

> `optional` **max?**: `number`

At most this many top-level sections (1–50). Absent: `THEME_LIMITS.sections`.

***

### pageType?

> `optional` **pageType?**: [`SurfacePageType`](../type-aliases/SurfacePageType)

The platform page type this surface renders. A page type with a resource
(`product`, `category`, `collection`, `page`, `landing`) makes the surface
a template: one document renders every resource of that type, and its
sections read the resource from `ThemeRenderContext.params`.

***

### required?

> `optional` **required?**: readonly [`RequiredBlock`](RequiredBlock)[]

Top-level sections the surface must hold, as a slot's `required`. Alternates inherit their base's.
