# RadzenFieldset Class

A fieldset container component that groups related form fields with a legend/header and optional collapse functionality. RadzenFieldset provides semantic form grouping with visual borders, useful for organizing complex forms into logical sections. Fieldsets are HTML form elements that semantically group related inputs, improving form structure and accessibility. Features visual and semantic grouping of related form fields, customizable header via Text or HeaderTemplate, optional expand/collapse to hide/show grouped fields, optional icon in the legend, optional summary content shown when collapsed, and screen reader announcement of fieldset legends for grouped fields. Use to organize forms into sections like "Personal Information", "Address", "Payment Details". When AllowCollapse is enabled, users can collapse sections they don't need to see.

Namespace: [Radzen.Blazor](https://blazor.radzen.com/docs/api/Radzen.Blazor.md)

Assembly: Radzen.Blazor.dll

## Inheritance

- Object
- ComponentBase
- [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md)
- RadzenFieldset

## Implements

- IComponent
- IHandleEvent
- IHandleAfterRender

## Syntax

```csharp
public class RadzenFieldset : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender
```

## Examples

Basic fieldset grouping form fields:

```razor
<RadzenFieldset Text="Personal Information">
    <RadzenStack Gap="1rem">
        <RadzenFormField Text="First Name">
            <RadzenTextBox @bind-Value=@model.FirstName />
        </RadzenFormField>
        <RadzenFormField Text="Last Name">
            <RadzenTextBox @bind-Value=@model.LastName />
        </RadzenFormField>
    </RadzenStack>
</RadzenFieldset>
```

Collapsible fieldset:

```razor
<RadzenFieldset Text="Advanced Options" Icon="settings" AllowCollapse="true">
    Advanced configuration fields...
</RadzenFieldset>
```

## Constructors

| Constructor | Description |
|-------------|-------------|
| `public RadzenFieldset()` | A fieldset container component that groups related form fields with a legend/header and optional collapse functionality. RadzenFieldset provides semantic form grouping with visual borders, useful for organizing complex forms into logical sections. Fieldsets are HTML form elements that semantically group related inputs, improving form structure and accessibility. Features visual and semantic grouping of related form fields, customizable header via Text or HeaderTemplate, optional expand/collapse to hide/show grouped fields, optional icon in the legend, optional summary content shown when collapsed, and screen reader announcement of fieldset legends for grouped fields. Use to organize forms into sections like "Personal Information", "Address", "Payment Details". When AllowCollapse is enabled, users can collapse sections they don't need to see. |

## Properties

| Property | Type | Description |
|------|------|-------------|
| AllowCollapse | `bool` | Gets or sets a value indicating whether collapsing is allowed. Set to false by default. |
| ChildContent | `RenderFragment` | Gets or sets the child content. |
| Collapse | `EventCallback` | Gets or sets the collapse callback. |
| CollapseAriaLabel | `string` | Gets or sets the aria-label attribute of the collapse button. |
| CollapseTitle | `string` | Gets or sets the title attribute of the collapse button. |
| Collapsed | `bool` | Gets or sets a value indicating whether this [RadzenFieldset](https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenFieldset.md) is collapsed. |
| Expand | `EventCallback` | Gets or sets the expand callback. |
| ExpandAriaLabel | `string` | Gets or sets the aria-label attribute of the expand button. |
| ExpandTitle | `string` | Gets or sets the title attribute of the expand button. |
| HeaderTemplate | `RenderFragment` | Gets or sets the header template. |
| Icon | `string` | Gets or sets the icon. |
| IconColor | `string` | Gets or sets the icon color. |
| SummaryTemplate | `RenderFragment` | Gets or sets the summary template. |
| Text | `string` | Gets or sets the text. |

## Methods

| Method | Returns | Description |
|------|---------|-------------|
| `BuildRenderTree(Rendering.RenderTreeBuilder __builder)` | `void` |  |
| `GetComponentCssClass()` | `string` |  |
| `OnInitialized()` | `void` |  |
| `SetParametersAsync(ParameterView parameters)` | `Task` |  |

## Inherited Members

- From [RadzenComponent](https://blazor.radzen.com/docs/api/Radzen.RadzenComponent.md): AddContextMenu, Attributes, ContextMenu, Culture, CurrentStyle, Debounce, DefaultCulture, DefaultUICulture, Dispose, Element, GetCssClass, GetId, GetIdAttribute, IsJSRuntimeAvailable, JSRuntime, Localize, MouseEnter, MouseLeave, OnAfterRenderAsync, OnBecameInvisible, OnContextMenu, OnMouseEnter, OnMouseLeave, RaiseContextMenu, RaiseMouseEnter, RaiseMouseLeave, Reference, Style, UICulture, UniqueID, Visible
- From ComponentBase: Assets, AssignedRenderMode, DispatchExceptionAsync, InvokeAsync, OnAfterRender, OnInitializedAsync, OnParametersSet, OnParametersSetAsync, RendererInfo, ShouldRender, StateHasChanged

