LivePane (Live Pane v0.2.0)

View Source

Function components for PaneGroup, Pane, and PaneResizer. Allows users to write:

<LivePane.group id="demo">
  <LivePane.pane id="pane1" group_id="demo">
    <div>Pane 1</div>
  </LivePane.pane>
  <LivePane.resizer id="resizer1" group_id="demo">
    <div>Resizer 1</div>
  </LivePane.resizer>
  <LivePane.pane id="pane2" group_id="demo">
    <div>Pane 2</div>
  </LivePane.pane>
</LivePane.group>

Summary

Functions

Attributes

  • id (:string) (required)
  • class (:string) - Defaults to "".
  • direction (:string) - Defaults to "horizontal". Must be one of "horizontal", or "vertical".
  • Global attributes are accepted.

Slots

  • inner_block (required)

Attributes

  • id (:string) (required) - The id of the pane element.
  • group_id (:string) (required) - ID of the group this pane belongs to.
  • class (:string) - Extra classes to apply to the pane. Defaults to "".
  • collapsed_size (:integer) - The size of the pane when it is in a collapsed state. Defaults to 0.
  • collapsible (:boolean) - Whether the pane can be collapsed. Defaults to false.
  • default_size (:integer) - The default size of the pane in percentage of the group's size. Defaults to nil.
  • max_size (:integer) - The maximum size of the pane in percentage of the group's size. Defaults to 100.
  • min_size (:integer) - The minimum size of the pane in percentage of the group's size. Defaults to 0.
  • order (:integer) - The order of the pane in the group. Useful for maintaining order when conditionally rendering panes. Defaults to 0.
  • Global attributes are accepted.

Slots

  • inner_block (required)

Attributes

  • id (:string) (required)
  • group_id (:string) (required)
  • direction (:string) - Defaults to "horizontal".
  • active (:string) - Defaults to "pointer".
  • disabled (:boolean) - Defaults to false.
  • class (:string) - Defaults to "".
  • Global attributes are accepted.

Slots

  • inner_block

Functions

group(assigns)

Attributes

  • id (:string) (required)
  • class (:string) - Defaults to "".
  • direction (:string) - Defaults to "horizontal". Must be one of "horizontal", or "vertical".
  • Global attributes are accepted.

Slots

  • inner_block (required)

pane(assigns)

Attributes

  • id (:string) (required) - The id of the pane element.
  • group_id (:string) (required) - ID of the group this pane belongs to.
  • class (:string) - Extra classes to apply to the pane. Defaults to "".
  • collapsed_size (:integer) - The size of the pane when it is in a collapsed state. Defaults to 0.
  • collapsible (:boolean) - Whether the pane can be collapsed. Defaults to false.
  • default_size (:integer) - The default size of the pane in percentage of the group's size. Defaults to nil.
  • max_size (:integer) - The maximum size of the pane in percentage of the group's size. Defaults to 100.
  • min_size (:integer) - The minimum size of the pane in percentage of the group's size. Defaults to 0.
  • order (:integer) - The order of the pane in the group. Useful for maintaining order when conditionally rendering panes. Defaults to 0.
  • Global attributes are accepted.

Slots

  • inner_block (required)

resizer(assigns)

Attributes

  • id (:string) (required)
  • group_id (:string) (required)
  • direction (:string) - Defaults to "horizontal".
  • active (:string) - Defaults to "pointer".
  • disabled (:boolean) - Defaults to false.
  • class (:string) - Defaults to "".
  • Global attributes are accepted.

Slots

  • inner_block