PlacementSlotType
A placement slot type definition.
Each slot type provides:
- A unique
idmatching a surface type or custom identifier - A human-readable
label - A description of the slot behavior
- A React component that renders the placement
- Optional
defaultPropsfor sensible defaults - An
acceptspredicate controlling which outputs this type handles
Type Parameters
Section titled “Type Parameters”P extends PlacementSlotProps = PlacementSlotProps
Properties
Section titled “Properties”accepts?
Section titled “accepts?”
optionalaccepts?: (output) =>boolean
Predicate to determine if this slot type can handle a given output.
Defaults to matching on surfaceType. Custom implementations can
match on template name, content shape, etc.
Parameters
Section titled “Parameters”output
Section titled “output”Returns
Section titled “Returns”boolean
component
Section titled “component”component:
ComponentType<P>
The React component that renders this placement type.
defaultProps?
Section titled “defaultProps?”
optionaldefaultProps?:Partial<P>
Default props merged with resolved props before rendering.
description
Section titled “description”description:
string
Description of this placement type.
id:
string
Unique identifier for this slot type (e.g. ‘banner’, ‘modal’, ‘custom:my-widget’).
label:
string
Human-readable label for the studio UI.
priority
Section titled “priority”priority:
number
Resolution priority. Higher values are evaluated first when multiple
slot types match the same surface type. Use this to let narrow/specific
predicates take precedence over broad ones without relying on
registration order. Default 0.
surfaceType
Section titled “surfaceType”surfaceType:
"custom"|"inline"|"banner"|"modal"|"tooltip"|"sidebar"|"toast"|"fullscreen"|"email"|"sms"|"push"|"in_page"|"button"|"full_page"|"agent"|"cli"
The surface type this slot type handles, or ‘custom’ for custom types.