# SbDropZone A designated area that accepts dragged items. Provides visual feedback during drag operations and can filter acceptable item types. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | PlaceholderText | string | "Drag items here" | Text shown when zone is empty | | DropText | string | "Drop here" | Text shown during drag over | | AcceptedTypes | string[]? | null | Array of accepted item types (null accepts all) | | Disabled | bool | false | Whether the zone accepts drops | | Class | string? | null | Additional CSS classes | ## Events | Event | Type | Description | |-------|------|-------------| | OnItemDropped | EventCallback | Fired when item is dropped | | OnDragEnter | EventCallback | Fired when drag enters zone | | OnDragExit | EventCallback | Fired when drag leaves zone | ## Templates / Slots | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment? | Content to show inside the zone | ## SbDropEventArgs Class | Property | Type | Description | |----------|------|-------------| | ClientX | double | X coordinate of drop | | ClientY | double | Y coordinate of drop | | Data | object? | Dropped data | ## CSS Classes - `sb-dropzone` - Base class - `sb-dropzone--drag-over` - Item is being dragged over - `sb-dropzone--disabled` - Disabled state - `sb-dropzone__indicator` - Drop indicator - `sb-dropzone__placeholder` - Empty placeholder - `sb-dropzone__icon` - Icon element - `sb-dropzone__text` - Text element ## Examples ### Basic Drop Zone ```razor @code { private void HandleDrop(SbDropEventArgs args) { Console.WriteLine($"Dropped at ({args.ClientX}, {args.ClientY})"); } } ``` ### With Custom Placeholder ```razor ``` ### With Type Filtering ```razor ``` ### With Content ```razor @if (droppedItems.Any()) { @foreach (var item in droppedItems) {
@item.Name
} }
``` ### Page Builder Canvas ```razor
@foreach (var block in pageBlocks) {
@block.Content
}
@code { private List pageBlocks = new(); private void AddBlock(SbDropEventArgs args) { if (args.Data is Block block) { pageBlocks.Add(block); } } } ``` ### Multiple Drop Zones ```razor
@foreach (var column in columns) {

@column.Title

@foreach (var task in column.Tasks) {
@task.Title
}
}
``` ### Disabled Drop Zone ```razor ```