Skip to content

Choose Your Framework

Annota provides the same powerful annotation capabilities for both React and Svelte. Choose your preferred framework to view framework-specific documentation and examples.

Annota for React includes:

  • React Hooks: useAnnotator, useAnnotations, useSelection, useTool, and more
  • React Components: <AnnotaViewer>, <Annotator>, <AnnotationPopup>, <ContextMenu>
  • TypeScript Support: Full type definitions for all APIs
  • Performance: Optimized for large-scale annotation with React 18+ and React 19+
Basic React Example
import { AnnotaProvider, AnnotaViewer, Annotator } from 'annota';
function App() {
return (
<AnnotaProvider>
<AnnotaViewer
options={{
tileSources: { type: 'image', url: '/image.tif' }
}}
>
{(viewer) => (
<Annotator viewer={viewer} />
)}
</AnnotaViewer>
</AnnotaProvider>
);
}

View React Documentation →

Both frameworks share the same:

  • Core System: Store, spatial indexing, layer management, history/undo-redo
  • Rendering Engine: PixiJS-based WebGL rendering for high performance
  • Tools System: Point, Rectangle, Polygon, Curve, Push, SAM, Split tools
  • Data Loaders: H5, PGM, JSON, and more
  • Styling: Flexible style expressions for dynamic annotation appearance

Core Architecture

Framework-agnostic architecture works identically in both React and Svelte. The framework layer only provides the reactive interface.

Learn about core concepts →

API Reference

Most APIs are shared between frameworks. Only the reactive layer (hooks vs stores) differs.

View API reference →

Migration Guide

Switching between React and Svelte? See the key differences and migration patterns.

Migration guide →