1. Domino UI
  2. Components
  3. Info box
Top Basic Hover Alignment Docs

Info box

Represents an informational box component that displays icon, title, and value information.

This class allows you to create and customize information boxes for displaying various types of information. You can set an icon, title, and value to be displayed within the box. Additionally, you can customize the hover effect and flip the box if needed.

Example usage:

 
 // Create an InfoBox with an icon, title, and value
 InfoBox infoBox = InfoBox.create(icon, "Title", "Value");

 // Customize the hover effect
 infoBox.setHoverEffect(InfoBox.HoverEffect.EXPAND);

 // Flip the InfoBox
 infoBox.setFlipped(true);

 // Add the InfoBox to a parent element
 Document.get().getBody().appendChild(infoBox.element());
 

See also :

Anatomy

alerts-anatomy.
  1. Info box Icon, can be aligned left or right.
  2. Info box title.
  3. Info box info element.

Examples

Basic info box A container to display a piece information with icon and title.

Hover effects Info box can have of the predefined hover effects.

Info box icon and text alignment The icon can be aligned to the left or right.

API Docs: InfoBox

Constructors

public void InfoBox()
Creates a new InfoBox with default settings.
public void InfoBox(IsElement<HTMLElement> icon)
Creates a new InfoBox with the provided icon.

icon

The icon element to be displayed.

public void InfoBox(IsElement<HTMLElement> icon, String title)
Creates a new InfoBox with the provided icon and title.

icon

The icon element to be displayed.

title

The title to be displayed in the InfoBox.

public void InfoBox(IsElement<HTMLElement> icon, String title, String value)
Creates a new InfoBox with the provided icon, title, and value.

icon

The icon element to be displayed.

title

The title to be displayed in the InfoBox.

value

The value to be displayed in the InfoBox.

Static methods

public static InfoBox create(Icon<?> icon, String title, String value)
Creates a new InfoBox with an icon, title, and value.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.

value

The value to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(IsElement<HTMLElement> icon, String title, String value)
Creates a new InfoBox with the provided icon, title, and value.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.

value

The value to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(HTMLElement icon, String title, String value)
Creates a new InfoBox with the provided icon, title, and value.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.

value

The value to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(HTMLElement icon, String title)
Creates a new InfoBox with the provided icon and title.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(IsElement<HTMLElement> icon, String title)
Creates a new InfoBox with the provided icon and title.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(Icon<?> icon, String title)
Creates a new InfoBox with the provided icon and title.

icon

The icon to be displayed.

title

The title to be displayed in the InfoBox.



Returns:

A new InfoBox instance.

public static InfoBox create(Icon<?> icon)
Creates a new InfoBox with the provided icon.

icon

The icon to be displayed.



Returns:

A new InfoBox instance.

public static InfoBox create(IsElement<HTMLElement> icon)
Creates a new InfoBox with the provided icon.

icon

The icon to be displayed.



Returns:

A new InfoBox instance.

public static InfoBox create(HTMLElement icon)
Creates a new InfoBox with the provided icon.

icon

The icon to be displayed.



Returns:

A new InfoBox instance.

Public methods

public InfoBox setHoverEffect(HoverEffect effect)
Sets the hover effect style for the InfoBox.

effect

The hover effect style to apply.



Returns:

This InfoBox instance.

public InfoBox setFlipped(boolean flipped)
Sets whether the InfoBox is flipped.

flipped

true to flip the InfoBox, false otherwise.



Returns:

This InfoBox instance.

public InfoBox setIcon(IsElement<HTMLElement> element)
Sets the icon for the InfoBox.

element

The icon element to be displayed.



Returns:

This InfoBox instance.

public InfoBox setInfo(String value)
Sets the informational value for the InfoBox.

value

The value to be displayed in the InfoBox.



Returns:

This InfoBox instance.

public InfoBox setTitle(String title)
Sets the title for the InfoBox.

title

The title to be displayed in the InfoBox.



Returns:

This InfoBox instance.

public DivElement getIcon()
Gets the icon element in the InfoBox.

Returns:

The icon element.

public InfoBox withIcon(ChildHandler<InfoBox, DivElement> handler)
Configures the InfoBox with an icon using a handler.

handler

The handler to configure the icon.



Returns:

This InfoBox instance.

public DivElement getTitle()
Gets the title element in the InfoBox.

Returns:

The title element.

public InfoBox withTitle(ChildHandler<InfoBox, DivElement> handler)
Configures the InfoBox with a title using a handler.

handler

The handler to configure the title.



Returns:

This InfoBox instance.

public InfoBox withTitle()
Configures the InfoBox with a title.

Returns:

This InfoBox instance.

public DivElement getInfo()
Gets the informational value element in the InfoBox.

Returns:

The value element.

public InfoBox withInfo()
Configures the InfoBox with an informational value.

Returns:

This InfoBox instance.

public InfoBox withInfo(ChildHandler<InfoBox, DivElement> handler)
Configures the InfoBox with an informational value using a handler.

handler

The handler to configure the informational value.



Returns:

This InfoBox instance.

public DivElement getContent()
Gets the content element of the InfoBox.

Returns:

The content element.

public InfoBox withContent()
Configures the InfoBox with content.

Returns:

This InfoBox instance.

public InfoBox withContent(ChildHandler<InfoBox, DivElement> handler)
Configures the InfoBox with content using a handler.

handler

The handler to configure the content.



Returns:

This InfoBox instance.

public HTMLDivElement element()
Check super implementation documentation.

We are a group of passionate people who love what we do

Donate & Support Us