DefaultVerticalAlignStyle

See source code

Default vertical alignment style property used by tldraw shapes for text positioning. Controls how text content is vertically aligned within shape boundaries.

Available values: - start - Align text to the top - middle - Center text vertically (default) - end - Align text to the bottom

DefaultVerticalAlignStyle: import("./StyleProp").EnumStyleProp<
  "end" | "middle" | "start"
>;

Example

import { DefaultVerticalAlignStyle } from "@tldraw/tlschema";

// Use in shape props definition
interface MyShapeProps {
  verticalAlign: typeof DefaultVerticalAlignStyle;
  // other props...
}

// Create a shape with top-aligned text
const shape = {
  // ... other properties
  props: {
    verticalAlign: "start" as const,
    // ... other props
  },
};
Prev
DefaultTextAlignStyle
Next
DocumentRecordType