menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ButtonType - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ButtonType

    Defines the button types available in the Toast notification component.

    Inheritance
    System.Object
    ButtonType
    Namespace: Syncfusion.Blazor.Notifications
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class ButtonType : Enum
    Remarks

    This enumeration specifies the different types of buttons that can be used within Toast notifications. Each button type corresponds to standard HTML button types and affects the button's behavior and styling.

    Examples

    Usage of different button types in a Toast notification:

    <SfToast>
        <ToastButtons>
            <ToastButton Content="OK" Type="ButtonType.Button" />
            <ToastButton Content="Submit" Type="ButtonType.Submit" />
            <ToastButton Content="Reset" Type="ButtonType.Reset" />
        </ToastButtons>
    </SfToast>

    Fields

    Button

    Specifies a standard button type that performs custom actions when clicked.

    Declaration
    public const ButtonType Button
    Field Value
    Type
    ButtonType
    Remarks

    This is the default button type used for general-purpose actions in Toast notifications. When clicked, it typically triggers custom event handlers or actions defined by the application.

    Reset

    Specifies a reset button type that clears or resets form data when clicked.

    Declaration
    public const ButtonType Reset
    Field Value
    Type
    ButtonType
    Remarks

    This button type is used to reset form fields to their default values within Toast notifications. When clicked, it clears any user input and restores the form to its initial state.

    Submit

    Specifies a submit button type that submits form data when clicked.

    Declaration
    public const ButtonType Submit
    Field Value
    Type
    ButtonType
    Remarks

    This button type is typically used when the Toast notification contains form elements that need to be submitted. When clicked, it triggers the form submission process, similar to an HTML submit button.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved