Skip to content

Changing the texts

Remember that BellJs accepts three parameters, well the first of them is an Object with the properties title and description.

  • title: This parameter configures the text of the alert title.
  • description: This parameter configures the text of the alert paragraph.

You can use both or just one, let’s see an example:

Only the title

To make an alert with only the title you must create an instance of Bell and pass as the first parameter an object with only the title.

new Bell({
title: "Only with title"
}).launch()

This will display an alert with only the title on the screen.

Only the description

In this case, instead of sending the title, we will send only the description, this in the first object.

new Bell({
description: "Only with description"
}).launch()

Always remember to send at least one of the properties.