NoteShapeOptions

See source code
Table of contents

Extends ShapeOptionsWithDisplayValues<TLNoteShape, NoteShapeUtilDisplayValues>.

interface NoteShapeOptions extends ShapeOptionsWithDisplayValues<
  TLNoteShape,
  NoteShapeUtilDisplayValues
> {}

Properties

AttributionComponent

The component used to render the note's "last edited by" attribution badge, both on the canvas and in image exports. Defaults to DefaultNoteShapeAttribution. Set it to null to hide the badge, or provide your own component (receiving TLNoteShapeAttributionProps) to replace it.

AttributionComponent: TLNoteShapeAttributionComponent;

Example

// hide the badge
NoteShapeUtil.configure({ AttributionComponent: null });

// render your own
NoteShapeUtil.configure({
  AttributionComponent: (props) => <MyBadge {...props} />,
});

resizeMode

How should the note shape resize? By default it does not resize (except automatically based on its text content), but you can set it to be user-resizable using scale.

resizeMode: "none" | "scale";

Methods

getCustomDisplayValues

Parameters

NameDescription

editor

Editor;

shape

Shape;

theme

TLTheme;

colorMode

"dark" | "light";

Returns

Partial<DisplayValues>;

getDefaultDisplayValues

Parameters

NameDescription

editor

Editor;

shape

Shape;

theme

TLTheme;

colorMode

"dark" | "light";

Returns

DisplayValues;

Prev
NonePathBuilderOpts
Next
NoteShapeUtilDisplayValues