Sidebar

Sidebar components for displaying and managing annotations.

Overview

Document.Annotation.Sidebar renders the annotation list. Without children, it renders the default list and cards. With children, use the namespaced sidebar parts to build a custom structure while keeping card behavior and context.

Usage

<Document.Annotation.Sidebar />
<Document.Annotation.Sidebar>
  <Document.Annotation.Sidebar.Header />
  <Document.Annotation.Sidebar.List>
    {annotations.map((annotation) => (
      <Document.Annotation.Sidebar.Card
        annotation={annotation}
        key={annotation.id}
      />
    ))}
  </Document.Annotation.Sidebar.List>
  <Document.Annotation.Sidebar.Empty />
</Document.Annotation.Sidebar>

API Reference

Document.Annotation.Sidebar

PropTypeDescription
classNamestringAdditional classes
childrenReactNodeCustom sidebar content

Document.Annotation.Sidebar.Header

Renders the sidebar heading and annotation count.

PropTypeDescription
classNamestringAdditional classes
childrenReactNodeCustom header content

Document.Annotation.Sidebar.List

Positions and renders annotation cards.

PropTypeDescription
classNamestringAdditional classes
childrenReactNodeCustom list content

Document.Annotation.Sidebar.Empty

Empty state shown when there are no annotations.

PropTypeDescription
classNamestringAdditional classes
childrenReactNodeCustom empty state content

Document.Annotation.Sidebar.Card

Renders one annotation card.

PropTypeDescription
annotationAnnotationDataThe annotation to render
classNamestringAdditional classes
childrenReactNodeCustom card content

On this page