TextOptions

Text configuration options (see example).

clip? Path

The clipping path for this element. The Path instance will be monitored for changes. Can be replaced by calling the clip method.

cursor? string

The CSS cursor of the element.

fill? FillOptions | Gradient

The fill options of the Shape.

font? string

The font to use for rendering the text. Accepts the standard CSS font syntax.

The following examples demonstrate valid font values:

  • Size and family: "2em 'Open Sans', sans-serif"
  • Style, size and family: "italic 2em 'Open Sans', sans-serif"

id? string

An optional id. The id will be rendered only for SVG output.

name? string

The optional name for this element.

opacity? number

The element opacity. Ranges from zero (completely transparent) to one (completely opaque).

stroke? StrokeOptions

The stroke options of the Shape.

transform? Transformation

The transformation to apply to this element.

visible? boolean

A flag which indicates if the element is visible.