The type of the value held by each entry.
The type of each entry's secondary value.
The type of the entry elements.
The element's view type, if initializing MVC.
The element's data type, if initializing MVC.
The element's model type, if initializing MVC.
The element's emitter type, if initializing MVC.
The type of the value held by each entry.
The type of each entry's secondary value.
The type of the entry elements.
The element's view type, if initializing MVC.
The element's data type, if initializing MVC.
The element's model type, if initializing MVC.
The element's emitter type, if initializing MVC.
Protected_ReadonlyselectStaticdefaultReadonlypropertiesReadonlyonReadonlyonReadonlyonReadonlytagReadonlyinitializedThe properties passed on to children created through feedforward, letting a parent seed its descendants with shared defaults.
ReadonlydataThe reifect controlling how each entry itself fades. Assigning a properties object builds a Reifect from it, and the result is attached to every current entry.
The reifect controlling how entries slide, which GradumContentSwitch.mode regenerates. Assigning a properties object builds a Reifect from it, and the result is attached to every current entry.
ProtectedapplyAnimates the container from its current size to the selected entry's natural
size. Subclasses should call super.applyTransition() then add their own entry-level logic.
The sequence:
from value)beforeResize() — subclass hook to prepare entries before the frametransitionDurationms: release explicit container sizeProtectedafterThe entry that is now selected.
ProtectedsetupProtectedbeforeThe newly selected entry.
StaticcreateFunction
create
The class create was called on.
Inferred from properties.view.
Inferred from properties.data.
Inferred from properties.model.
Inferred from properties.emitter.
Optionalproperties: This["prototype"]["properties"] & ElementTagDefinition<"div"> & Omit<Properties to set on the new instance.
The created instance, typed as the class this was called on.
Instantiate this class with the given properties. Defaults declared by every class in the
inheritance chain are applied first, nearest ancestor last, so a subclass' defaultProperties win over
its parent's. The return type follows the class it is called on, and the MVC type parameters are read
back off the properties — passing model: MyModel types .model as MyModel without a cast.
Note: the callee is read through this["prototype"] rather than InstanceType<this>, because the
latter instantiates a generic class' parameters with their constraints instead of their defaults,
which is what forced casts at call sites.
Protected StaticcustomProtected Function
Properties to set on the new instance, defaults already merged in.
The created instance.
The construction step behind create. Override it to change how instances of a class
are built — to route through a factory, or to wrap the instance — while keeping the default-merging that
create performs.
ProtectedsetupProtectedsetupProtectedsetupProtectedsetupFunction
feedforward
Optionalproperties: FeedforwardProperties
Properties to feed forward. Defaults to
defaultFeedforwardProperties.
Itself, allowing for method chaining.
Function
clone
Optionaloptions: CloneElementOptions
What to carry over to the copy.
The cloned element.
GradumContentSwitch
Description
Shows one entry at a time and animates the swap when the selection changes. Registered as
<gradum-content-switch>. Selection works as on any GradumSelectElement; this adds the transition between the outgoing and incoming entry, configured through GradumContentSwitch.mode.