MarkpromptOptions

Prop Type Description Default
apiUrl string

The base API URL.

"https://api.markprompt.com"
headers { [key: string]: string }

Headers to pass along the request.

children ReactNode

Trigger component, such as a search button or a floating chat bubble.

display MarkpromptDisplay

The way to display the chat/search content.

"sheet"
sticky boolean

Enable user interactions outside of the dialog while keeping it open.

false
defaultView View

The default view to show when both chat and search are enabled.

"search"
layout 'panels' | 'tabs'

Multi-pane layout when both search and chat are enabled.

"panels"
menu MenuOptions

Options for the menu component.

chat UserConfigurableOptions & ChatOptions

Options for the chat component.

search SubmitSearchQueryOptions & SearchOptions

Options for the search component.

feedback SubmitFeedbackOptions & FeedbackOptions

Options for the feedback component.

references ReferencesOptions

Options for the references component.

integrations IntegrationsOptions

Options for integrations.

trigger TriggerOptions

Options for the trigger component.

close CloseOptions

Options for the close button.

description DescriptionOptions

Options for the description.

title TitleOptions

Options for the title component.

linkAs ElementType<{ href?: string }>

Component to use in place of <a>.

"a"
showBranding boolean

Options for the title component.

true
branding BrandingOptions

Options for the title component.

debug boolean

Display debug info.

false

BrandingOptions

Prop Type Description Default
show boolean

Show branding.

true
type 'plain' | 'text'

Branding display type.

true

CloseOptions

Prop Type Description Default
label string

aria-label for the close modal button.

"Close Markprompt"
visible boolean

Show the close button

true
hasIcon boolean

Show an × icon in the close button instead of the keyboard shortcut ('Esc').

true

DescriptionOptions

Prop Type Description Default
hide boolean

Visually hide the description

true
text string

Description text

TitleOptions

Prop Type Description Default
hide boolean

Visually hide the title.

true
text string

Text for the title.

"Ask AI"

TriggerOptions

Prop Type Description Default
label string

aria-label for the open button

"Ask AI"
buttonLabel string

Label for the open button

placeholder string

Placeholder text for non-floating element.

"Ask AI"
floating boolean

Should the trigger button be displayed as a floating button at the bottom right of the page? Setting this to false will display a trigger button in the element passed to the markprompt function.

customElement ReactNode

Do you use a custom element as the dialog trigger?

iconSrc string

Custom image icon source for the open button

View

1type View = 'chat' | 'search' | 'create-ticket';