mqr.nbtools.

hstack#

mqr.nbtools.hstack(*args, margin='5px 10px 5px 10px', justify_content='stretch', justify_items='center', align_content='start', align_items='start')#

Horizontally stack the html, markdown or string representation of args.

The args will be stacked in order from left to right, and converted like this:

  • if the arg has the attribute __repr__, then its output is used pre-formatted,

  • if the arg has the attribute _repr_html_, then its output is used,

  • if the arg is a string, then it is treated as markdown and converted to HTML,

  • otherwise, the arg’s default string conversion is used.

Parameters:
args

Elements to stack horizontally.

marginfloat

Set in the style attribute of a div wrapping elements in this stack (excluding lines, which have a fixed 5px margin).

justify_contentstr, optional

Set in the style attribute of the flexbox containing this stack.

justify_itemsstr, optional

Set in the style attribute of the flexbox containing this stack.

align_contentstr, optional

Set in the style attribute of the flexbox containing this stack.

align_itemsstr, optional

Set in the style attribute of the flexbox containing this stack.

Returns:
IPython.display.HTML

Stacked elements which can be directly displayed in jupyter.