How can we help? πŸ‘‹

Opening the widget

Learn how to programatically open a single article on your website

Last updated on September 8, 2021

It seems like you are looking for a way to programatically open the HelpKit widget? You have come to the right place. Using our widget API is super simple.

Β 

Helpkit.show()

To open the widget you can use the Helpkit.show() function.

Β 

Helpkit.show(view, type?, articleId?)

Β 

view String : 'popover' | 'sidebar'

type String : 'article' (optional)

articleId String : 'your_article_page_id' (optional)

Β 

Opening the widget

In order to open the widget within your website all you have to do is define the view parameter

Example of a button with an event listener that displays the widget πŸ‘‡

<button onclick="Helpkit.show('popover')">Open the widget</button>

Opening a single article

In order to open a single article within your website you have to define all three parameters.

Example of a button with an event listener that displays a single article πŸ‘‡

<button onclick="Helpkit.show('popover', 'article', 'qYFazNTSwDkVohWu9S5rbe')">Open the widget</button>
Β 

Popover vs Sidebar view

Here you can see the visual difference between 'popover' and 'sidebar'

view
view 'popover'
view
view 'sidebar'
Β 
Β 
Did this answer your question?
😞
😐
🀩