Skip to content
Inkoxide

Search covers every page and heading of the docs. Use ↑ ↓ and ↵.

Note

A text note: an icon that opens its text in the viewer.

Edit this page

Import them from @inkoxide/react, @inkoxide/vue or @inkoxide/svelte; an Angular template writes them as <ink-note>. Examples, and how these components work together, are in the guide.

Note

A text note: a sticky-note icon that viewers open to show its text (the children, which are strings). It takes no space; the icon sits at the top-left corner of its box. Its colour is its backgroundColor (default yellow).

import { Document, Note, Page, Text } from '@inkoxide/react';

export default function Example() {
  return (
    <Document>
      <Page size={[320, 120]} className="p-6">
        <Text>
          Total: $1,250
          <Note author="Ana">Includes the March refund.</Note> due on 1 May.
        </Text>
      </Page>
    </Document>
  );
}
<script setup lang="ts">
import { Document, Note, Page, Text } from '@inkoxide/vue';
</script>

<template>
  <Document>
    <Page :size="[320, 120]" class="p-6">
      <Text>
        Total: $1,250<Note author="Ana">Includes the March refund.</Note> due on 1 May.
      </Text>
    </Page>
  </Document>
</template>
<script lang="ts">
  import { Document, Note, Page, Text } from '@inkoxide/svelte';
</script>

<Document>
  <Page size={[320, 120]} class="p-6">
    <Text>
      Total: $1,250<Note author="Ana">Includes the March refund.</Note> due on 1 May.
    </Text>
  </Page>
</Document>
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@Component({
  selector: 'app-example',
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <ink-document>
      <ink-page [size]="[320, 120]" class="p-6">
        <ink-text>
          Total: $1,250<ink-note author="Ana">Includes the March refund.</ink-note> due on 1 May.
        </ink-text>
      </ink-page>
    </ink-document>
  `,
})
export class Example {}
The PDF this example renders.
PropTypeDescription
authorstringWho wrote the note; viewers show it as its title.
openbooleanShows the note's text when the document opens.
icon'note' | 'comment' | 'key' | 'help' | 'newParagraph' | 'paragraph' | 'insert'The icon: a note (the default), a speech bubble, a key, a question mark, a new paragraph, a pilcrow or a caret.
childrenReactNodeThe note's text: strings and numbers only.

It also takes the shared props break, wrap, minPresenceAhead, fixed, pages, className, style, id, debug.

Synced from components/note.md in the inkoxide repository.