Table of Contents

Class VToggle

Namespace
Velvet.Experimental
Assembly
Velvet.Docs.dll

EXPERIMENTAL. Initializer-style builder for a toggle. Maps to Toggle(string?, bool?, Action<bool>?, string?, string?, string?, bool?, Func<VisualElement, Action>?, string?, string?, string?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?). Toggles are leaves; children added via the collection initializer are ignored.

public sealed class VToggle : VBuilder
Inheritance
object
VToggle
Inherited Members

Constructors

VToggle(string?)

Properties

Enabled

When false, disables user interaction.

Label

Label text shown next to the toggle.

OnChange

Handler invoked when the toggle state changes.

Value

Current toggle state (controlled).

Methods

Build()

Converts this builder into a concrete VNode by delegating to the matching V.* factory.