<sideBySide>
<sideBySide> is a Sectional
component that takes enclosed sectional components and renders them in a side-by-side horizontal format.
Attributes and Properties
Attributes for <sideBySide>
Other (5)
[ _componentSizeList ]. List of margin widths between panels.
valignkeyword. Default vertical alignment for all panels.
| Value | Description |
|---|---|
top | Align panels to the top. |
middle | Vertically center panels. |
bottom | Align panels to the bottom. |
valigns[ keyword ]. Per-panel vertical alignment values.
| Value | Description |
|---|---|
top | Align the panel to the top. |
middle | Vertically center the panel. |
bottom | Align the panel to the bottom. |
widthcomponentSize. Total rendered width of the side-by-side container.
[ _componentSizeList ]. List of widths for each panel.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <sideBySide name="s">
Other (9)
$s.absoluteMeasurementsboolean. Whether children's widths are interpreted in absolute units.
$s.disabledboolean. Whether this component is disabled and cannot be interacted with.
$s.fixedboolean. Whether this component's value is fixed and cannot be modified.
$s.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$s.gapWidthnumber. The gap width between panels as a percentage of the total container width.
$s.margins[ number ]. Margins between adjacent children.
$s.valigns[ text ]. Vertical alignment of each child.
$s.widths[ number ]. The list of child widths.
Common to all components (4)
$s.doenetMLtext. The DoenetML source code that produced this component.
$s.hideboolean. Whether to hide this component from the rendered output.
$s.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$s.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Default <sideBySide>
Three examples of different components placed in a <sideBySide> are illustrated. By default, portions are assigned an equal percentage width, with no margin. These settings can be modified with the widths and margins attributes.
Attribute Examples
Attribute Example: widths
The widths attribute assigns a width to each side-by-side portion by percent.
Attribute Example: margins
The margins attribute assigns a margin between each side-by-side portion by
percent. When widths and margins attributes are both applied, margins are applied first.