Docs

API reference

Text

Place a title, body copy, label, or number as an editable text layer.

presentation.tsx

<Text id="headline" role="title" x={8} y={8} w={70} h={14} color="#171717" fontFamily="Arial" fontSize={42} fontWeight={700} lineHeight={1.1}>
  A clear headline
</Text>

Props reference

Keep these values literal and serializable so Canvas, Inspector, validation, and export can process them reliably.

APIPropertyType / valuesRequiredDescription
Shared native-layer propsidstringYesStable, unique layer identifier. Required for every visible native layer.
xnumberYesLeft position as a percentage of the slide canvas.
ynumberYesTop position as a percentage of the slide canvas.
wnumberYesFrame width as a percentage of the slide canvas.
hnumberYesFrame height as a percentage of the slide canvas.
groupIdstring—Groups native children without adding a wrapper element.
groupNamestring—Human-readable name for a group in Workbench.
sharedIdstring—Matches the same layer type across adjacent Morph slides; unique within each slide.
rotationnumber—Clockwise rotation in degrees.
opacitynumber—Layer opacity from 0 to 1.
motionJSON string—Versioned declarative action sequence. Keep a complete static final frame.
interactionJSON string—Versioned click interaction for slide navigation or a link.
TextchildrenReactNodeYesText content for the layer.
role"title" | string—Use title for the primary slide title.
fontFamilystring—Font family name.
fontSizenumber—Font size in points when Slide uses fontSizeUnit="pt".
fontWeightnumber | string—Font weight, such as 400 or 700.
fontStyle"italic"—Italic text style.
colorcolor string—Text color.
backgroundcolor string—Text-frame background color.
radiusnumber—Corner radius for the text frame.
lineHeightnumber—Line-height multiplier.
letterSpacingnumber—Letter spacing in points.
textAlignleft | center | right—Horizontal text alignment.
textVerticalAligntop | middle | bottom—Vertical text alignment in the frame.
listTypebullet | ordered—Optional list formatting.
listStartnumber—Starting number for an ordered list.

Required syntax

Text uses children for its content and needs id plus x, y, w, and h. Use role="title" for the primary title of a slide.

Common styling

Use color, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, and textAlign as literal values. With fontSizeUnit="pt" on Slide, fontSize is in points.