It's basically a factory of Node. Implement this interface to create reusable HTML fragments.

For example a snippet to build a modal dialog, like this:

shared class Dialog(String title, Boolean closeable = true,
             Div body, Button* buttons = {})
         satisfies Snippet<Div> {

     content => Div {
         classNames = "modal";
         Aria {
             role = dialog;
         Div {
             classNames = "modal-header";
             closeable then Button {
                 classNames = "close";
         Div {
             classNames = "modal-body";
         Div {
             classNames = "modal-footer";

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

contentSource Codeshared formal Result|{Result*}|Null content

Build the snippet content.

stringSource Codeshared actual default String string

A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the hash of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation.

Inherited Attributes
Attributes inherited from: Object
Inherited Methods
Methods inherited from: Object