ink-cartridge
    Preparing search index...

    Function closeLayer

    • Close a registered layer by its ID.

      Removes the layer and all of its elements; the keyboard engine drops the layer's bindings with it. Typically called from the layer's own element (via a bound key or a button callback) or from the cleanup of the effect that opened the layer.

      Parameters

      • targetLayerId: string

      Returns void

      const { closeLayer } = useScreenSystem();
      // in a key handler or button callback of the layer element:
      closeLayer('edit-panel');