Interface methods

Interface methods allow your app to trigger interactive UI elements within the Rocketlane platform. These methods are used to display dialogs, confirmations, and notifications to guide user actions or provide feedback.

Capabilities

Apps can use client.interface methods to:

  • Display modal dialogs
  • Prompt users with confirmations
  • Show toast notifications

Example: Dialog Confirmation

const result = await client.interface.show("dialog", {
  title: "Deleting a task, blocking from marketplace app",
  content: `Are you sure you want to delete this task?`,
});

This opens a confirmation dialog with a custom title and message. Use the returned result to determine how the user responded.

Available Interface Methods

Method Description Options
client.interface.show("dialog", options) Displays a confirmation dialog { title, content }
client.interface.show("notification", options) Shows a toast notification { type, message }
Note: All interface methods return a Promise. Handle them using await or .then() to ensure proper flow control.

What’s Next