Types: PlatformSectionType to AcceptedBlock
The types of @poltura/theme-sdk/elements, PlatformSectionType to AcceptedBlock.
On this page
import { … } from '@poltura/theme-sdk/elements';PlatformSectionType
A section type the platform ships.
type PlatformSectionType = 'account' | 'account-addresses-main' | 'account-order-main' | 'account-orders-main' | 'account-settings-main' | 'announcement-bar' | 'article-main' | 'auth-form' | 'banner' | 'bento' | 'blog-main' | 'cart' | 'checkout' | 'collection-listing' | 'consent-banner' | 'consent-preferences' | 'contact-main' | 'copy' | 'cta-strip' | 'custom-section' | 'faq' | 'faq-main' | 'featured-rail' | 'footer' | 'gallery' | 'gate-main' | 'guide-main' | 'guides-main' | 'header' | 'heading' | 'hero' | 'image-with-text' | 'language-popup' | 'legal-main' | 'logo-list' | 'newsletter-band' | 'newsletter-popup' | 'not-found-main' | 'order-confirmed-main' | 'order-status-main' | 'page-body' | 'page-hero' | 'page-main' | 'partner-badges' | 'password-forgot-main' | 'password-reset-main' | 'payment-band' | 'platform-widget' | 'product-grid' | 'product-information' | 'related-products' | 'rich-text' | 'spacer' | 'stats' | 'steps' | 'store-form' | 'testimonials' | 'trust' | 'trust-row' | 'trust-strip' | 'verify-main' | 'video'MediaValue
The stored value of a media field: a media:// library file, an asset:// theme file, an image URL, or '' when unset.
type MediaValue = stringIconValue
The stored value of an icon field: a content icon name, lucide:<name>, logo:<id> for a platform logo, or svg:<markup> for a custom icon.
type IconValue = stringSettingsSchema
A settings object: setting id to field.* result, in inspector order.
type SettingsSchema = ElementSettingsSchemaSettingsOf
The settings a component receives for a schema; fields with a default are always present.
type SettingsOf<S extends SettingsSchema> = ElementSettingsOf<S>FieldSpec
What a field.* builder returns: one setting's inspector description, carrying its value type.
type FieldSpec<TValue = unknown> = FieldDef<TValue>FieldBuilders
The field builders, one per setting kind: text, number, colour, image, link, product and more.
type FieldBuilders = typeof elementFieldsFieldSet
A reusable group of settings: call it with a prefix and spread the result into settings.
type FieldSet<S extends SettingsSchema> = ElementFieldSet<S>FieldSetOptions
What a field set's call takes beside its prefix: an optional heading, and this use's own defaults and locale paths.
type FieldSetOptions<S extends SettingsSchema = SettingsSchema> = ElementFieldSetOptions<S>ThemeSettingsDefinition
The theme settings src/settings.ts declares: the panel's groups and their fields.
type ThemeSettingsDefinition = ElementThemeSettingsDefinitionThemeSettingsGroupDefinition
One group of the theme settings panel: its id, heading and field.* settings by path.
type ThemeSettingsGroupDefinition = ElementThemeSettingsGroupDefinitionElementCategory
A picker group an element is listed under, such as marketing or product.
type ElementCategory = ElementCategoryNameElementIntent
What a section is for: its kinds, moods, photos, products, height and source.
type ElementIntent = ElementIntentValueExample
import type { ElementIntent } from '@poltura/theme-sdk/elements';
const intent: ElementIntent = {
kinds: ['campaign'],
photos: { min: 1, max: 1, aspect: 'landscape' },
};StyleCapability
A group of style controls the inspector's Style tab offers, such as spacing or background.
type StyleCapability = StyleCapabilityNameElementIconId
An icon of the element picker and navigator.
type ElementIconId = ElementIconNameElementWording
Own wording of an element, field, preset or slot by admin language, such as { hu: { label: 'Csempék' } }.
type ElementWording = Partial<Record<ElementWordingLanguage, {
readonly label?: string;
readonly description?: string;
readonly placeholder?: string;
readonly options?: Readonly<Record<string, string>>;
}>>It wins over machine translation; a language or key left out falls back to it.
ElementSlot
A named region of an element that Slot draws, with its label and accepted children.
namerequiredstringThe name `Slot` draws the region by.
labelrequiredstringThe region's label in the navigator, in the theme's base language.
acceptsstring[]Child types the region takes, a subset of what the element accepts; omit to take all.
i18nElementWordingThe region's own label per admin language.
ElementPreset
A named starting configuration an element offers on insert; a plain insert applies default, other presets get their own tiles.
idrequiredstringStable id of the preset within its element.
labelrequiredstringThe preset's label in the picker, in the theme's base language.
descriptionstringOne line shown under the label in the picker.
i18nElementWordingThe preset's own label and description per admin language.
settingsElementSettingsSeedSettings the inserted element starts with.
styleElementStyleStyle of the inserted element itself.
blocksElementSeed[]Children the inserted element starts with.
ElementScope
A data scope an element reads from above or opens for its children: product or collection.
type ElementScope = ScopeKindSectionGroup
A page-wide section group outside the templates: header or footer.
type SectionGroup = ElementSectionGroupBlockFrameTag
The box the platform draws around each block instance: div, li, span, or self for platform elements.
type BlockFrameTag = BlockFrameElementStyle
Style values in theme tokens, as an element instance stores them.
type ElementStyle = ElementStyleValueElementSeed
A child element a static block or preset starts with.
type ElementSeed = PresetElementElementSettingsSeed
Settings an instance starts with, by setting id.
type ElementSettingsSeed = ThemeSettingsBagElementAttrs
Attributes to spread on the element's root node, so merchant styling, anchors and the editor reach it.
classNamestringThe class the element's generated style targets; merge it into the root's own classes.
data-pestringThe instance id the customizer selects the element by; present in the editor only.
idstringThe merchant's anchor, so a link to `#<id>` scrolls here; absent when unset.
data-pe-motionstring`once` or `repeat` when the instance plays an entrance animation; absent otherwise.
data-schemestringThe colour scheme a block draws in, which remaps the colour roles inside it; absent inherits.
ElementRenderProps
What an element component receives for an already computed settings type.
type ElementRenderProps<TSettings>settingsrequiredTSettingsTranslated settings, coerced to the element's schema.
attrsrequiredElementAttrsAttributes to spread on the root node; empty for an override, whose frame the platform draws.
idrequiredstringThe instance id, unique across the layout file.
ElementProps
What a section or block component receives for its settings schema.
type ElementProps<S extends SettingsSchema = SettingsSchema>settingsrequiredTSettingsTranslated settings, coerced to the element's schema.
attrsrequiredElementAttrsAttributes to spread on the root node; empty for an override, whose frame the platform draws.
idrequiredstringThe instance id, unique across the layout file.
ElementComponent
A component that draws an element from its settings.
type ElementComponent<TSettings> = (props: ElementRenderProps<TSettings>) => ReactNodeAcceptedBlock
A defineBlock result named in accepts instead of its type key.
kindrequired'block'Always `block`.
typerequiredstringThe block's type key.