<ref>
The <ref> component renders a link to another Doenet document or to an external website.
Attributes and Properties
Attributes for <ref>
Other (3)
boolean. Default value: false. Whether to render this reference as a clickable button.
textTypetext. Default value: type-global. Type of text to use for the reference label.
toreference or text. The target that the reference points to (component reference or URL string).
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 <ref name="r">
Other (8)
$r.disabledboolean. Whether this component is disabled and cannot be interacted with.
$r.fixedboolean. Whether this component's value is fixed and cannot be modified.
$r.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$r.linkTexttext. The display text used for the link.
$r.texttext. The text used as the link label.
$r.textTypetext. Type of text to use for the reference label.
$r.urltext. The resolved URL of the referenced component.
Common to all components (4)
$r.doenetMLtext. The DoenetML source code that produced this component.
$r.hideboolean. Whether to hide this component from the rendered output.
$r.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$r.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: <ref> to an external website
In the example above, the to attribute of the <ref> component is used with the address of an external
webpage to create a link within a paragraph.
Attribute Examples
Attribute Example: createButton
The createButton attribute is used render the link in button format.