Interface SerializedTextboxProps

Hierarchy

  • SerializedITextProps
  • Pick<UniqueTextboxProps, "minWidth" | "splitByGrapheme">
    • SerializedTextboxProps

Properties

angle: TDegree

Angle of rotation of an object (in degrees)

Default

0
backgroundColor: string

Background color of an object. takes css colors https://www.w3.org/TR/css-color-3/

Default


charSpacing: number
clipPath?: Partial<SerializedObjectProps> & ClipPathProps

a fabricObject that, without stroke define a clipping area with their shape. filled in black the clipPath object gets used when the object has rendered, and the context is placed in the center of the object cacheCanvas. If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center'

direction: CanvasDirection
fill: null | string | Record<string, any> | Partial<Gradient<"linear", "linear">> & {
    colorStops: ColorStop[];
    coords: LinearGradientCoords<number>;
    gradientTransform: undefined | number[];
    gradientUnits: GradientUnits;
    offsetX: number;
    offsetY: number;
    type: "linear";
} | Partial<Gradient<"radial", "radial">> & {
    colorStops: ColorStop[];
    coords: RadialGradientCoords<number>;
    gradientTransform: undefined | number[];
    gradientUnits: GradientUnits;
    offsetX: number;
    offsetY: number;
    type: "radial";
}

Color of object's fill takes css colors https://www.w3.org/TR/css-color-3/

Default

rgb(0,0,0)
fillRule: CanvasFillRule

Fill rule used to fill an object accepted values are nonzero, evenodd Backwards incompatibility note: This property was used for setting globalCompositeOperation until v1.4.12 (use globalCompositeOperation instead)

Default

nonzero
flipX: boolean

When true, an object is rendered as flipped horizontally

Default

false
flipY: boolean

When true, an object is rendered as flipped vertically

Default

false
fontFamily: string
fontSize: number
fontStyle: string
fontWeight: string
globalCompositeOperation: GlobalCompositeOperation

Composite rule used for canvas globalCompositeOperation

Default


height: number

Object height

Default


left: number

Left position of an object. Note that by default it's relative to object left. You can change this by setting originX={left/center/right}

Default

0
lineHeight: number
linethrough: boolean
minWidth: number
opacity: number

Opacity of an object

Default

1
originX: TOriginX

Horizontal origin of transformation of an object (one of "left", "right", "center") See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups

Default

'left'
originY: TOriginY

Vertical origin of transformation of an object (one of "top", "bottom", "center") See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups

Default

'top'
overline: boolean
paintFirst: "fill" | "stroke"

Determines if the fill or the stroke is drawn first (one of "fill" or "stroke")

Default


pathAlign: TPathAlign
pathSide: TPathSide
scaleX: number

Object scale factor (horizontal)

Default

1
scaleY: number

Object scale factor (vertical)

Default

1
selectionEnd: number
selectionStart: number
shadow: null | Partial<SerializedShadowOptions>

Shadow object representing shadow of this shape

Default

null
skewX: number

Angle of skew on x axes of an object (in degrees)

Default

0
skewY: number

Angle of skew on y axes of an object (in degrees)

Default

0
splitByGrapheme: boolean
stroke: null | string | Record<string, any> | Partial<Gradient<"linear", "linear">> & {
    colorStops: ColorStop[];
    coords: LinearGradientCoords<number>;
    gradientTransform: undefined | number[];
    gradientUnits: GradientUnits;
    offsetX: number;
    offsetY: number;
    type: "linear";
} | Partial<Gradient<"radial", "radial">> & {
    colorStops: ColorStop[];
    coords: RadialGradientCoords<number>;
    gradientTransform: undefined | number[];
    gradientUnits: GradientUnits;
    offsetX: number;
    offsetY: number;
    type: "radial";
}

When defined, an object is rendered via stroke and this property specifies its color takes css colors https://www.w3.org/TR/css-color-3/

Default

null
strokeDashArray: null | number[]

Array specifying dash pattern of an object's stroke (stroke must be defined)

Default

null;
strokeDashOffset: number

Line offset of an object's stroke

Default

0
strokeLineCap: CanvasLineCap

Line endings style of an object's stroke (one of "butt", "round", "square")

Default

butt
strokeLineJoin: CanvasLineJoin

Corner style of an object's stroke (one of "bevel", "round", "miter")

Default


strokeMiterLimit: number

Maximum miter length (used for strokeLineJoin = "miter") of an object's stroke

Default

4
strokeUniform: boolean

When false, the stoke width will scale with the object. When true, the stroke will always match the exact pixel size entered for stroke width. this Property does not work on Text classes or drawing call that uses strokeText,fillText methods default to false

Since

2.6.0

Default

false

Default

false
strokeWidth: number

Width of a stroke used to render this object

Default

1
textAlign: string
top: number

Top position of an object. Note that by default it's relative to object top. You can change this by setting originY={top/center/bottom}

Default

0
underline: boolean
visible: boolean

When set to false, an object is not rendered on canvas

Default


width: number

Object width

Default


Generated using TypeDoc