The Gravstrap Collapse shortcode handles the Bootstrap Collapse component. Here is a live example:

The collapse shortcode, shown above, is defined by the following definition:

[g-collapse id="collapse1" name=collapse1 button_label="Collapse" attributes="aria-expanded:false,aria-controls:collapse"]
[g-well name=well2]
Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

Shortcode parameters

The [bootstrap-collapse] shortcode has some optional parameters:

  • name - defines an unique component name.
  • id - defines the same name HTML property
  • tag - defines tag used to display the collpase button. Accepted values are button|a and button is the default value for this property.
  • button_type - defines the collapse button type and could be one of the following values: primary|success|info|warning|danger|link|default.
  • button_label - defines the collapse button label
  • attributes - defines extra attributes you can add to your shortcode. Attributes is a string of HTML key:value tokens, separated by commas. A valid attributes value is attributes=class:myclass, rel:my-rel".

Next Post Previous Post