Use
Add a control to activate showcase for a given field or set of selectors via a list of labels, buttons or a dropdown menu.
Example
Showcase by field:
@controls {
bottom {
showcase {
by: "State";
}
}
}
Showcase using custom selectors:
@controls {
bottom {
showcase {
option {
label: "People";
selector: person;
}
option {
label: "Orgs";
selector: organization;
}
}
}
}
Supported properties
by
is the field you'd like to use for showcasing wrapped in double quotes. If you don't includeby: field
you need to list out each option - see "supported children" guidance below.mode
controls how the selection is showcasednormal
showcase the selection plus any connections between the showcased elements (default)loose
showcase the selection plus neighboring elementsstrict
only showcase the selection itselfas
controls how the control is presented. Do you want a list of labels, buttons, or a dropdown for activating showcase?labels
show options as a list of clickable labelsbuttons
show options as a group of buttonsdropdown
show options as dropdownmultiple
controls whether more than one value can be selected at a timetrue
allow multiple values to be selectedfalse
only allow one value to be selected at a timeplaceholder
the text to display when nothing is selected (foras: dropdown
only)summary
override the summary that's shown for the current selection (foras: dropdown
). The summary will be shown regardless of what's selected so there's no need to useplaceholder
in this case.default
defines which field values should be selected by default (forby: "field"
only). Useselect-all
to select everything by default.
Supported children
If you want to use custom selectors to build the showcase, you'll need to list each option out separately. The options are defined by option
blocks nested within the control and each option
supports the following properties:
label
the text to display for that optionselector
the selector to use for the showcasedefault
true
value is selected by defaultfalse
value is unselected by default
Showcase by state and include neighboring elements, allowing multiple states to be selected at the same time:
@controls {
bottom {
showcase {
by: "State";
mode: loose;
multiple: true;
}
}
}
Showcase by state using a dropdown menu, and include a placeholder with instructions:
@controls {
bottom {
showcase {
by: "State";
as: dropdown;
placeholder: "Select a state";
}
}
}
Showcase by state and select all states by default:
@controls {
bottom {
showcase {
by: "State";
default: select-all;
}
}
}