# elements (/themes/sdk/reference/elements)

```ts
import { … } from '@poltura/theme-sdk/elements';
```

## [Hooks](/themes/sdk/reference/elements/hooks) [#hooks]

| Name | What it is |
| --- | --- |
| [`useElement`](/themes/sdk/reference/elements/hooks#useelement) | The section or block instance currently drawing. |
| [`useChildBlocks`](/themes/sdk/reference/elements/hooks#usechildblocks) | The shown children of the current element in one region, in authored order and in the shopper's language. |
| [`useHasElementBackground`](/themes/sdk/reference/elements/hooks#usehaselementbackground) | Whether the element has a background: an image or video the merchant gave it. |
| [`useIsPageLead`](/themes/sdk/reference/elements/hooks#useispagelead) | Whether the section being drawn opens the page, so its picture is the largest one above the fold. |

## [Parts](/themes/sdk/reference/elements/parts) [#parts]

| Name | What it is |
| --- | --- |
| [`Slot`](/themes/sdk/reference/elements/parts#slot) | Draws the children of the current section or block in one region, each through its own component and frame. |
| [`EditableText`](/themes/sdk/reference/elements/parts#editabletext) | A plain-text setting of the current element, editable in place on the customizer canvas; nothing when empty. |
| [`EditableRichText`](/themes/sdk/reference/elements/parts#editablerichtext) | A rich-text setting of the current element, editable in place on the customizer canvas. |
| [`ElementBackground`](/themes/sdk/reference/elements/parts#elementbackground) | The background the merchant styled the current element with: image, video or overlay; nothing when unset. |
| [`ElementDividers`](/themes/sdk/reference/elements/parts#elementdividers) | The shape dividers the merchant set on the current element's edges; nothing when unset. |

## [Definers](/themes/sdk/reference/elements/definers) [#definers]

| Name | What it is |
| --- | --- |
| [`defineSection`](/themes/sdk/reference/elements/definers#definesection) | Declares a section: its type key, inspector settings, children and the component that draws it. |
| [`defineBlock`](/themes/sdk/reference/elements/definers#defineblock) | Declares a block that draws itself inside the frame the platform puts around each instance. |
| [`defineThemeSettings`](/themes/sdk/reference/elements/definers#definethemesettings) | Declares the theme settings panel in `src/settings.ts`: its groups and their `field.*` settings, keyed by their path in the theme's values. |

## [Functions](/themes/sdk/reference/elements/functions) [#functions]

| Name | What it is |
| --- | --- |
| [`overrideSection`](/themes/sdk/reference/elements/functions#overridesection) | Swaps the renderer of a platform section type; the platform keeps its schema, inspector and data. |
| [`overrideBlock`](/themes/sdk/reference/elements/functions#overrideblock) | Swaps the renderer of a platform block type everywhere it appears; the platform keeps its schema. |
| [`fieldSet`](/themes/sdk/reference/elements/functions#fieldset) | A group of settings several elements share, such as a button's label and link; each call spreads its fields into a schema as `<prefix>_<key>`. |
| [`lazyBlock`](/themes/sdk/reference/elements/functions#lazyblock) | A component whose code loads in its own chunk, server-rendered unless `ssr` is false. |

## [Constants](/themes/sdk/reference/elements/constants) [#constants]

| Name | What it is |
| --- | --- |
| [`field`](/themes/sdk/reference/elements/constants#field) | The setting builders a definition's `settings` object is written with. |
| [`ELEMENT_CATEGORIES`](/themes/sdk/reference/elements/constants#element_categories) | Every picker group, in picker order. |
| [`ELEMENT_WILDCARD`](/themes/sdk/reference/elements/constants#element_wildcard) | In `accepts`, admits any element. |
| [`THEME_BLOCK_WILDCARD`](/themes/sdk/reference/elements/constants#theme_block_wildcard) | In `accepts`, admits the theme's and the installed apps' blocks. |
| [`STYLE_CAPABILITIES`](/themes/sdk/reference/elements/constants#style_capabilities) | Every style group an element can offer. |

## [Types](/themes/sdk/reference/elements/types-1) [#types]

| Name | What it is |
| --- | --- |
| [`LinkValue`](/themes/sdk/reference/elements/types-1#linkvalue) | The stored value of a link field: a bare URL or path, or the link with its options. |
| [`PlatformBlockSettings`](/themes/sdk/reference/elements/types-1#platformblocksettings) | The settings of a platform block type, as the merchant set them. |
| [`PlatformBlockType`](/themes/sdk/reference/elements/types-1#platformblocktype) | A block type the platform ships. |
| [`PlatformSectionSettings`](/themes/sdk/reference/elements/types-1#platformsectionsettings) | The settings of a platform section type, as the merchant set them. |
| [`PlatformSectionType`](/themes/sdk/reference/elements/types-2#platformsectiontype) | A section type the platform ships. |
| [`MediaValue`](/themes/sdk/reference/elements/types-2#mediavalue) | The stored value of a media field: a `media://` library file, an `asset://` theme file, an image URL, or `''` when unset. |
| [`IconValue`](/themes/sdk/reference/elements/types-2#iconvalue) | 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. |
| [`SettingsSchema`](/themes/sdk/reference/elements/types-2#settingsschema) | A settings object: setting id to `field.*` result, in inspector order. |
| [`SettingsOf`](/themes/sdk/reference/elements/types-2#settingsof) | The settings a component receives for a schema; fields with a `default` are always present. |
| [`FieldSpec`](/themes/sdk/reference/elements/types-2#fieldspec) | What a `field.*` builder returns: one setting's inspector description, carrying its value type. |
| [`FieldBuilders`](/themes/sdk/reference/elements/types-2#fieldbuilders) | The `field` builders, one per setting kind: text, number, colour, image, link, product and more. |
| [`FieldSet`](/themes/sdk/reference/elements/types-2#fieldset) | A reusable group of settings: call it with a prefix and spread the result into `settings`. |
| [`FieldSetOptions`](/themes/sdk/reference/elements/types-2#fieldsetoptions) | What a field set's call takes beside its prefix: an optional heading, and this use's own defaults and locale paths. |
| [`ThemeSettingsDefinition`](/themes/sdk/reference/elements/types-2#themesettingsdefinition) | The theme settings `src/settings.ts` declares: the panel's groups and their fields. |
| [`ThemeSettingsGroupDefinition`](/themes/sdk/reference/elements/types-2#themesettingsgroupdefinition) | One group of the theme settings panel: its id, heading and `field.*` settings by path. |
| [`ElementCategory`](/themes/sdk/reference/elements/types-2#elementcategory) | A picker group an element is listed under, such as `marketing` or `product`. |
| [`ElementIntent`](/themes/sdk/reference/elements/types-2#elementintent) | What a section is for: its `kinds`, `moods`, `photos`, `products`, `height` and `source`. |
| [`StyleCapability`](/themes/sdk/reference/elements/types-2#stylecapability) | A group of style controls the inspector's Style tab offers, such as `spacing` or `background`. |
| [`ElementIconId`](/themes/sdk/reference/elements/types-2#elementiconid) | An icon of the element picker and navigator. |
| [`ElementWording`](/themes/sdk/reference/elements/types-2#elementwording) | Own wording of an element, field, preset or slot by admin language, such as `{ hu: { label: 'Csempék' } }`. |
| [`ElementSlot`](/themes/sdk/reference/elements/types-2#elementslot) | A named region of an element that `Slot` draws, with its label and accepted children. |
| [`ElementPreset`](/themes/sdk/reference/elements/types-2#elementpreset) | A named starting configuration an element offers on insert; a plain insert applies `default`, other presets get their own tiles. |
| [`ElementScope`](/themes/sdk/reference/elements/types-2#elementscope) | A data scope an element reads from above or opens for its children: `product` or `collection`. |
| [`SectionGroup`](/themes/sdk/reference/elements/types-2#sectiongroup) | A page-wide section group outside the templates: `header` or `footer`. |
| [`BlockFrameTag`](/themes/sdk/reference/elements/types-2#blockframetag) | The box the platform draws around each block instance: `div`, `li`, `span`, or `self` for platform elements. |
| [`ElementStyle`](/themes/sdk/reference/elements/types-2#elementstyle) | Style values in theme tokens, as an element instance stores them. |
| [`ElementSeed`](/themes/sdk/reference/elements/types-2#elementseed) | A child element a static block or preset starts with. |
| [`ElementSettingsSeed`](/themes/sdk/reference/elements/types-2#elementsettingsseed) | Settings an instance starts with, by setting id. |
| [`ElementAttrs`](/themes/sdk/reference/elements/types-2#elementattrs) | Attributes to spread on the element's root node, so merchant styling, anchors and the editor reach it. |
| [`ElementRenderProps`](/themes/sdk/reference/elements/types-2#elementrenderprops) | What an element component receives for an already computed settings type. |
| [`ElementProps`](/themes/sdk/reference/elements/types-2#elementprops) | What a section or block component receives for its settings schema. |
| [`ElementComponent`](/themes/sdk/reference/elements/types-2#elementcomponent) | A component that draws an element from its settings. |
| [`AcceptedBlock`](/themes/sdk/reference/elements/types-2#acceptedblock) | A `defineBlock` result named in `accepts` instead of its type key. |
| [`StaticBlockDefinition`](/themes/sdk/reference/elements/types-3#staticblockdefinition) | One fixed child of a section or block that merchants can hide and restyle but never move or delete. |
| [`ElementBlocksRule`](/themes/sdk/reference/elements/types-3#elementblocksrule) | Which child elements an element accepts, in the customizer and in saved layouts. |
| [`ElementContextRule`](/themes/sdk/reference/elements/types-3#elementcontextrule) | Scopes an element reads from above (`requires`) and opens for its children (`provides`). |
| [`ElementDefinitionBase`](/themes/sdk/reference/elements/types-3#elementdefinitionbase) | What sections and blocks share in their definition; every property is literal data the compiler reads statically. |
| [`SectionDefinition`](/themes/sdk/reference/elements/types-3#sectiondefinition) | The object passed to `defineSection`. |
| [`BlockDefinition`](/themes/sdk/reference/elements/types-3#blockdefinition) | The object passed to `defineBlock`. |
| [`SectionElement`](/themes/sdk/reference/elements/types-3#sectionelement) | A declared section, ready to export from a file under `src/sections`. |
| [`BlockElement`](/themes/sdk/reference/elements/types-3#blockelement) | A declared block, ready to export from a file under `src/blocks` or `src/sections`. |
| [`SectionOverride`](/themes/sdk/reference/elements/types-3#sectionoverride) | A theme renderer for a platform section type whose schema, inspector and data the platform keeps. |
| [`BlockOverride`](/themes/sdk/reference/elements/types-3#blockoverride) | A theme renderer for a platform block type whose schema, inspector and data the platform keeps. |
| [`SlotTag`](/themes/sdk/reference/elements/types-3#slottag) | The element type of a slot's box; `none` draws the children straight into the parent. |
| [`SlotProps`](/themes/sdk/reference/elements/types-3#slotprops) | Props of [`Slot`](/themes/sdk/reference/elements/parts#slot). |
| [`EditableTextTag`](/themes/sdk/reference/elements/types-3#editabletexttag) | A tag [`EditableText`](/themes/sdk/reference/elements/parts#editabletext) can render. |
| [`EditableTextProps`](/themes/sdk/reference/elements/types-3#editabletextprops) | Props of [`EditableText`](/themes/sdk/reference/elements/parts#editabletext). |
| [`EditableRichTextProps`](/themes/sdk/reference/elements/types-4#editablerichtextprops) | Props of [`EditableRichText`](/themes/sdk/reference/elements/parts#editablerichtext). |
| [`ElementContext`](/themes/sdk/reference/elements/types-4#elementcontext) | The element instance currently drawing. |
| [`ChildBlock`](/themes/sdk/reference/elements/types-4#childblock) | A child instance of the current element. |
| [`LazyBlockOptions`](/themes/sdk/reference/elements/types-4#lazyblockoptions) | Options of [`lazyBlock`](/themes/sdk/reference/elements/functions#lazyblock). |

<AnchorRedirect to={{"hooks":"/themes/sdk/reference/elements/hooks","useelement":"/themes/sdk/reference/elements/hooks","usechildblocks":"/themes/sdk/reference/elements/hooks","usehaselementbackground":"/themes/sdk/reference/elements/hooks","useispagelead":"/themes/sdk/reference/elements/hooks","parts":"/themes/sdk/reference/elements/parts","slot":"/themes/sdk/reference/elements/parts","editabletext":"/themes/sdk/reference/elements/parts","editablerichtext":"/themes/sdk/reference/elements/parts","elementbackground":"/themes/sdk/reference/elements/parts","elementdividers":"/themes/sdk/reference/elements/parts","definers":"/themes/sdk/reference/elements/definers","definesection":"/themes/sdk/reference/elements/definers","defineblock":"/themes/sdk/reference/elements/definers","definethemesettings":"/themes/sdk/reference/elements/definers","functions":"/themes/sdk/reference/elements/functions","overridesection":"/themes/sdk/reference/elements/functions","overrideblock":"/themes/sdk/reference/elements/functions","fieldset":"/themes/sdk/reference/elements/functions","lazyblock":"/themes/sdk/reference/elements/functions","constants":"/themes/sdk/reference/elements/constants","field":"/themes/sdk/reference/elements/constants","element_categories":"/themes/sdk/reference/elements/constants","element_wildcard":"/themes/sdk/reference/elements/constants","theme_block_wildcard":"/themes/sdk/reference/elements/constants","style_capabilities":"/themes/sdk/reference/elements/constants","types":"/themes/sdk/reference/elements/types-1","linkvalue":"/themes/sdk/reference/elements/types-1","platformblocksettings":"/themes/sdk/reference/elements/types-1","platformblocktype":"/themes/sdk/reference/elements/types-1","platformsectionsettings":"/themes/sdk/reference/elements/types-1","platformsectiontype":"/themes/sdk/reference/elements/types-2","mediavalue":"/themes/sdk/reference/elements/types-2","iconvalue":"/themes/sdk/reference/elements/types-2","settingsschema":"/themes/sdk/reference/elements/types-2","settingsof":"/themes/sdk/reference/elements/types-2","fieldspec":"/themes/sdk/reference/elements/types-2","fieldbuilders":"/themes/sdk/reference/elements/types-2","fieldsetoptions":"/themes/sdk/reference/elements/types-2","themesettingsdefinition":"/themes/sdk/reference/elements/types-2","themesettingsgroupdefinition":"/themes/sdk/reference/elements/types-2","elementcategory":"/themes/sdk/reference/elements/types-2","elementintent":"/themes/sdk/reference/elements/types-2","stylecapability":"/themes/sdk/reference/elements/types-2","elementiconid":"/themes/sdk/reference/elements/types-2","elementwording":"/themes/sdk/reference/elements/types-2","elementslot":"/themes/sdk/reference/elements/types-2","elementpreset":"/themes/sdk/reference/elements/types-2","elementscope":"/themes/sdk/reference/elements/types-2","sectiongroup":"/themes/sdk/reference/elements/types-2","blockframetag":"/themes/sdk/reference/elements/types-2","elementstyle":"/themes/sdk/reference/elements/types-2","elementseed":"/themes/sdk/reference/elements/types-2","elementsettingsseed":"/themes/sdk/reference/elements/types-2","elementattrs":"/themes/sdk/reference/elements/types-2","elementrenderprops":"/themes/sdk/reference/elements/types-2","elementprops":"/themes/sdk/reference/elements/types-2","elementcomponent":"/themes/sdk/reference/elements/types-2","acceptedblock":"/themes/sdk/reference/elements/types-2","staticblockdefinition":"/themes/sdk/reference/elements/types-3","elementblocksrule":"/themes/sdk/reference/elements/types-3","elementcontextrule":"/themes/sdk/reference/elements/types-3","elementdefinitionbase":"/themes/sdk/reference/elements/types-3","sectiondefinition":"/themes/sdk/reference/elements/types-3","blockdefinition":"/themes/sdk/reference/elements/types-3","sectionelement":"/themes/sdk/reference/elements/types-3","blockelement":"/themes/sdk/reference/elements/types-3","sectionoverride":"/themes/sdk/reference/elements/types-3","blockoverride":"/themes/sdk/reference/elements/types-3","slottag":"/themes/sdk/reference/elements/types-3","slotprops":"/themes/sdk/reference/elements/types-3","editabletexttag":"/themes/sdk/reference/elements/types-3","editabletextprops":"/themes/sdk/reference/elements/types-3","editablerichtextprops":"/themes/sdk/reference/elements/types-4","elementcontext":"/themes/sdk/reference/elements/types-4","childblock":"/themes/sdk/reference/elements/types-4","lazyblockoptions":"/themes/sdk/reference/elements/types-4"}} />
