Package-level declarations
Types
Link copied to clipboard
data class KUploadFile(val id: String, val name: String, val sizeBytes: Long, val mimeType: String? = null, val status: KUploadStatus = KUploadStatus.Idle, val progress: Float = 0.0f)
State model for a file managed by the uploader.
Link copied to clipboard
Represents the current status of an individual file in the uploader.
Functions
Link copied to clipboard
fun KDropzone(onClick: () -> Unit, modifier: Modifier = Modifier, isHoveredOrDragging: Boolean = false, enabled: Boolean = true, shape: Shape = MaterialTheme.kindlingShapes.radiusLg, content: @Composable ColumnScope.() -> Unit)
Base dropzone container component inspired by Better Upload / shadcn.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun KDropzoneMedia(modifier: Modifier = Modifier, size: Dp = 48.dp, containerColor: Color = MaterialTheme.colorScheme.surfaceVariant, content: @Composable BoxScope.() -> Unit)
Link copied to clipboard
Link copied to clipboard
fun KFileItem(file: KUploadFile, onRemove: (KUploadFile) -> Unit, modifier: Modifier = Modifier, onRetry: (KUploadFile) -> Unit? = null, shape: Shape = MaterialTheme.kindlingShapes.radiusMd)
Displays a single file item with its status, progress, and actions.
Link copied to clipboard
fun KFileList(files: List<KUploadFile>, onRemoveFile: (KUploadFile) -> Unit, modifier: Modifier = Modifier, onRetryFile: (KUploadFile) -> Unit? = null)
Animated list container for managing file items.
Link copied to clipboard
fun KUploadArea(files: List<KUploadFile>, onSelectFiles: () -> Unit, onRemoveFile: (KUploadFile) -> Unit, modifier: Modifier = Modifier, onRetryFile: (KUploadFile) -> Unit? = null, titleText: String = "Click to upload or drag & drop", maxFileSizeText: String? = "Max file size: 10MB", acceptedTypesText: String? = null, enabled: Boolean = true, isDragging: Boolean = false)
Complete, ready-to-use upload area preset with file list and drag-drop cues.