Auxx.ai

showDialog

Open dialogs, alerts, confirmations, and toasts from your Auxx app.

The dialog API lets your app display UI overlays inside the Auxx platform. All functions are imported from @auxx/sdk/client.

showDialog

Opens a dialog with a custom component.

import { showDialog } from '@auxx/sdk/client'

await showDialog({
  title: 'Edit Contact',
  Dialog: ({ hideDialog }) => <EditContactForm onDone={hideDialog} />,
  size: 'medium',
})
PropertyTypeDescription
titlestringDialog title bar text
Dialog(props: { hideDialog: () => void }) => DialogElementComponent to render inside the dialog
size'small' | 'medium' | 'large' | 'fullscreen'Dialog width (default: 'medium')

Dialogs can only render approved SDK components (TextBlock, Button, Badge, etc.). Raw HTML elements are blocked at compile time.

closeDialog

Programmatically close the current dialog.

import { closeDialog } from '@auxx/sdk/client'

await closeDialog()

alert

Show a simple alert message.

import { alert } from '@auxx/sdk/client'

await alert({
  title: 'Success',
  message: 'The email was sent.',
  variant: 'success',
})
PropertyTypeDescription
titlestringAlert heading
messagestringAlert body text
variant'info' | 'warning' | 'error' | 'success'Visual style (default: 'info')

confirm

Show a confirmation dialog and wait for the user's response.

import { confirm } from '@auxx/sdk/client'

const confirmed = await confirm({
  title: 'Delete record?',
  message: 'This action cannot be undone.',
  confirmText: 'Delete',
  cancelText: 'Cancel',
  destructive: true,
})

if (confirmed) {
  // proceed with deletion
}
PropertyTypeDescription
titlestringConfirmation heading
messagestringConfirmation body text
confirmTextstring?Confirm button label (default: 'OK')
cancelTextstring?Cancel button label (default: 'Cancel')
destructiveboolean?Red styling for destructive actions

showToast

Display a brief notification toast.

import { showToast } from '@auxx/sdk/client'

showToast({
  message: 'Contact saved',
  variant: 'success',
  duration: 3000,
})
PropertyTypeDescription
messagestringToast text
variant'info' | 'warning' | 'error' | 'success'Visual style (default: 'info')
durationnumber?Auto-dismiss time in ms

Navigate the user to different locations within Auxx.

import { navigateTo, openRecord, openUrl } from '@auxx/sdk/client'

// Navigate to an internal Auxx page
navigateTo('/app/tickets')

// Open a specific record
openRecord('rec_abc123')

// Open an external URL
openUrl('https://example.com', true) // true = new tab
FunctionSignatureDescription
navigateTo(path: string) => voidNavigate to an internal Auxx route
openRecord(recordId: string) => voidOpen a record's detail page
openUrl(url: string, newTab?: boolean) => voidOpen a URL (optionally in a new tab)