Skip to content

API Overview

Ornata currently exposes three runtime exports for defining components and enhancing HTML:

  • defineComponent
  • createInitializer
  • isComponent

The main authoring workflow starts with defineComponent(), then uses mount() directly or createInitializer() for declarative bootstrapping.

Creates an Ornata component constructor from typed component options.

Creates a function that scans the document for data-ornata roots and mounts matching components.

Checks whether a value is an Ornata component constructor.

A component constructor returned by defineComponent() includes:

  • displayName
  • mount()
  • getInstance()
  • findInstance()
  • unmount()

See Component Instance for the mounted instance API and lifecycle details.