DefaultNoteShapeAttribution

See source code
Table of contents

The default attribution badge shown in the corner of a note shape — the display name of the user who last edited the note's text.

Override it (or hide it) with the note shape util's AttributionComponent option:

// hide the attribution badge
<Tldraw shapeUtils={[NoteShapeUtil.configure({ AttributionComponent: null })]} />

// render your own
<Tldraw shapeUtils={[NoteShapeUtil.configure({ AttributionComponent: (props) => <MyBadge {...props} /> })]} />

Properties

color

The label color to use for the badge.

color: string;

firstName

The first name (the part shown in the badge).

firstName: string;

name

The full display name of the user who last edited the note's text.

name: string;

scale

The note's scale. Only meaningful for the 'canvas' variant.

scale: number;

shape

The note shape the attribution belongs to.

shape: TLNoteShape;

variant

Where the attribution is being rendered. The 'canvas' variant renders the interactive badge (with a tooltip); the 'export' variant renders static markup suitable for an SVG/PNG export.

variant: "canvas" | "export";

Prev
DefaultNavigationPanel
Next
DefaultPageMenu