# SbForm
A form container component that wraps Blazor's EditForm with consistent styling and structure.
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| Model | object | - | The form model for data binding |
| OnValidSubmit | EventCallback | - | Callback when form submits with valid data |
| OnInvalidSubmit | EventCallback | - | Callback when form submits with invalid data |
| Class | string? | null | Additional CSS classes |
## Templates / Slots (RenderFragments)
| Slot | Type | Description |
|------|------|-------------|
| ChildContent | RenderFragment | Form fields and content |
## CSS Classes
- `sb-form` - Base class
## Examples
### Basic Usage
```razor
Login
@code {
private LoginModel loginModel = new();
private async Task HandleLogin()
{
await AuthService.LoginAsync(loginModel);
}
}
```
### With Validation Summary
```razor
Register
```
### Handling Invalid Submit
```razor
@code {
private void ShowValidationErrors()
{
ToastService.Warning("Please fix the validation errors");
}
}
```