Class Sealed
public sealed class MokaJsonToolbar : ComponentBase

Namespace: Moka.Blazor.Json.Components

Toggleable toolbar providing search, collapse/expand, format, and copy actions.

Inheritance

Inherits from: ComponentBase

Properties

NameDescription
IsBusy Whether a heavy operation is in progress (disables action buttons).
IsFormatted Whether the JSON is currently formatted (pretty-printed).
OnCollapseAll Callback to collapse all nodes.
OnCopyAll Callback to copy all JSON to clipboard.
OnExpandAll Callback to expand all nodes.
OnExport Callback to export/download the JSON as a file.
OnFormatToggle Callback to toggle between formatted and minified display.
OnSearchToggle Callback to toggle the search overlay.
OnSettingsToggle Callback to toggle the settings panel.
ShowSettingsButton Whether the settings gear button is shown. Default is true.
ToolbarExtra Optional extra content to render at the end of the toolbar.
ToolbarMode How toolbar buttons are displayed: text, icons, or both.

IsBusy

[Parameter]
public bool IsBusy { get; set; }

Whether a heavy operation is in progress (disables action buttons).

IsFormatted

[Parameter]
public bool IsFormatted { get; set; }

Whether the JSON is currently formatted (pretty-printed).

OnCollapseAll

[Parameter]
public EventCallback OnCollapseAll { get; set; }

Callback to collapse all nodes.

OnCopyAll

[Parameter]
public EventCallback OnCopyAll { get; set; }

Callback to copy all JSON to clipboard.

OnExpandAll

[Parameter]
public EventCallback OnExpandAll { get; set; }

Callback to expand all nodes.

OnExport

[Parameter]
public EventCallback OnExport { get; set; }

Callback to export/download the JSON as a file.

OnFormatToggle

[Parameter]
public EventCallback OnFormatToggle { get; set; }

Callback to toggle between formatted and minified display.

OnSearchToggle

[Parameter]
public EventCallback OnSearchToggle { get; set; }

Callback to toggle the search overlay.

OnSettingsToggle

[Parameter]
public EventCallback OnSettingsToggle { get; set; }

Callback to toggle the settings panel.

ShowSettingsButton

[Parameter]
public bool ShowSettingsButton { get; set; }

Whether the settings gear button is shown. Default is true.

ToolbarExtra

[Parameter]
public RenderFragment? ToolbarExtra { get; set; }

Optional extra content to render at the end of the toolbar.

ToolbarMode

[Parameter]
public MokaJsonToolbarMode ToolbarMode { get; set; }

How toolbar buttons are displayed: text, icons, or both.

Type Relationships
classDiagram
    style MokaJsonToolbar fill:#f9f,stroke:#333,stroke-width:2px
    MokaJsonToolbar --|> ComponentBase : inherits
View Source
/// <summary>
///     Toggleable toolbar providing search, collapse/expand, format, and copy actions.
/// </summary>
public sealed partial class MokaJsonToolbar : ComponentBase
{
    /// <summary>Callback to toggle the search overlay.</summary>
    [Parameter]
    public EventCallback OnSearchToggle { get; set; }

    /// <summary>Callback to expand all nodes.</summary>
    [Parameter]
    public EventCallback OnExpandAll { get; set; }

    /// <summary>Callback to collapse all nodes.</summary>
    [Parameter]
    public EventCallback OnCollapseAll { get; set; }

    /// <summary>Callback to toggle between formatted and minified display.</summary>
    [Parameter]
    public EventCallback OnFormatToggle { get; set; }

    /// <summary>Callback to copy all JSON to clipboard.</summary>
    [Parameter]
    public EventCallback OnCopyAll { get; set; }

    /// <summary>Callback to export/download the JSON as a file.</summary>
    [Parameter]
    public EventCallback OnExport { get; set; }

    /// <summary>Whether the JSON is currently formatted (pretty-printed).</summary>
    [Parameter]
    public bool IsFormatted { get; set; } = true;

    /// <summary>Optional extra content to render at the end of the toolbar.</summary>
    [Parameter]
    public RenderFragment? ToolbarExtra { get; set; }

    /// <summary>Whether a heavy operation is in progress (disables action buttons).</summary>
    [Parameter]
    public bool IsBusy { get; set; }

    /// <summary>How toolbar buttons are displayed: text, icons, or both.</summary>
    [Parameter]
    public MokaJsonToolbarMode ToolbarMode { get; set; } = MokaJsonToolbarMode.Text;

    /// <summary>Callback to toggle the settings panel.</summary>
    [Parameter]
    public EventCallback OnSettingsToggle { get; set; }

    /// <summary>Whether the settings gear button is shown. Default is <c>true</c>.</summary>
    [Parameter]
    public bool ShowSettingsButton { get; set; } = true;
}
Was this page helpful?