# Change Log

fui-logo

Files ui

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. This file also consider all dropzone-ui [releases](https://github.com/dropzone-ui/dropzone-ui-react/releases). ## [2.1.0](https://github.com/files-ui/files-ui-react/releases/tag/2.1.0) (2026-08-05) ### πŸ”Œ Plugin Ecosystem, Image Editing & Material Edit and select Icons Two new optional plugin packages and a new image editing API extend Files UI without bloating the core bundle. All changes are fully backward-compatible. --- ### πŸ”Œ Plugin Packages Two new optional plugin packages have been created to extend Files UI functionality without bloating the core library: #### πŸ“Έ **@files-ui/crop** β€” Image Cropping A lightweight (~11KB gzipped) image cropping solution built on `react-easy-crop`. Provides a styled `CropDialog` component and `useCropDialog` hook for seamless integration with the edit icon. **Features:** - βœ… Interactive crop area with 8-point resize handles - βœ… Movable crop box (click and drag) - βœ… Rectangular and square aspect ratios - βœ… Real-time preview - βœ… Easy integration with FileMosaic/FileCard ```tsx import { FileMosaic } from "@files-ui/react"; import { CropDialog, useCropDialog } from "@files-ui/crop/react"; function MyComponent() { const { cropFile, openCrop, closeCrop, handleCropComplete } = useCropDialog({ onComplete: (croppedFile) => updateFile(croppedFile) }); return ( <> {cropFile && ( )} ); } ``` **πŸ“¦ Installation:** ```bash npm install @files-ui/crop ``` --- #### πŸ—œοΈ **@files-ui/compress** β€” Image Compression Client-side image compression and optimization (~8KB gzipped). Reduce file sizes before upload with customizable quality, max dimensions, and format conversion. **Features:** - βœ… Automatic format conversion (JPEG, PNG, WebP) - βœ… Configurable quality and dimensions - βœ… Metadata preservation option - βœ… Progress callbacks - βœ… Works with crop plugin seamlessly ```tsx import { compressImage } from "@files-ui/compress"; const compressed = await compressImage(file, { maxSizeMB: 1, maxWidthOrHeight: 1920, quality: 0.8, format: "webp" }); ``` **πŸ“¦ Installation:** ```bash npm install @files-ui/compress ``` --- ### πŸ“š Integration Example Combine edit, crop, and compress for a complete image workflow: ```tsx import { Dropzone, FileMosaic } from "@files-ui/react"; import { CropDialog, useCropDialog } from "@files-ui/crop/react"; import { compressImage } from "@files-ui/compress"; function ImageUploader() { const [files, setFiles] = useState([]); const { cropFile, openCrop, closeCrop, handleCropComplete } = useCropDialog({ onComplete: async (croppedFile) => { // Compress after crop const compressed = await compressImage(croppedFile, { maxWidthOrHeight: 1920, quality: 0.85 }); updateFile(compressed); } }); return ( <> {files.map(file => ( ))} {cropFile && ( )} ); } ``` Both packages are independently versioned and maintained. See their respective READMEs for detailed API documentation. --- ### ✨ Features #### πŸ–ΌοΈ Edit Icon for Images Added `onEdit` and `onCrop` callback props to [`FileMosaic`](https://www.files-ui.com/components/filemosaic) and [`FileCard`](https://www.files-ui.com/components/filecard) components. When provided, an edit icon (pencil) appears over valid image files, allowing users to trigger image editing workflows. **Key Features:** - βœ… **Precedence Rule** β€” `onEdit` takes precedence over `onCrop`. If both are provided, only `onEdit` will be called. - πŸ–ΌοΈ **Image-Only** β€” The edit icon only appears for files with `valid: true` and `type` starting with `"image/"`. - 🎯 **Callback Signature** β€” Both callbacks receive the full `ExtFile` object: `(file: ExtFile) => void`. - 🎨 **Consistent Styling** β€” Icon matches existing action buttons (Delete, Download) in size and appearance. **Example Usage:** ```tsx import { FileMosaic } from "@files-ui/react"; function MyComponent() { const handleEdit = (file) => { console.log("Opening editor for:", file.name); // Open your image editor or crop dialog here }; return ( ); } ``` **πŸ“Œ Note:** This release provides the edit icon integration point. The actual crop/edit dialog implementation is available as separate plugin packages (see πŸ”Œ Plugin Packages above). --- #### β˜‘οΈ Material Design Selection Icons Replaced native HTML `` in [`FileMosaic`](https://www.files-ui.com/components/filemosaic) and [`FileCard`](https://www.files-ui.com/components/filecard) with custom Material Design SVG icon components for a more consistent and polished UI. **New Icon Components:** - βœ… `CheckBox` β€” Selected state (filled checkbox with checkmark, default `#1976d2`) - βœ… `CheckBoxOutline` β€” Unselected state (outlined empty box, default `#757575`) **Key Improvements:** - 🎨 **Consistent Sizing** β€” Uses `parseSize()` like all other icons (Edit, Delete, Download) - πŸŒ™ **Dark Mode Support** β€” Colors adapt automatically when `darkMode` prop is set - β™Ώ **Better Accessibility** β€” Larger click target compared to native checkbox - πŸ–ŒοΈ **CSS Styling** β€” Dark mode container with `rgba(66,66,66,0.94)` background and enhanced shadows **Dark Mode Color Scheme:** | State | Light Mode | Dark Mode | |-------|-----------|-----------| | Selected | `#1976d2` (blue) | `#1976d2` (blue) | | Unselected | `#757575` (gray) | `#616161` (darker gray) | | Container BG | `rgba(255,255,255,0.94)` | `rgba(66,66,66,0.94)` | ```tsx ``` --- ### πŸ› Bug Fixes #### πŸ”§ Edit Icon Rendering Fix - [``](https://www.files-ui.com/components/filemosaic) and [``](https://www.files-ui.com/components/filecard): - βœ… Fixed Edit icon component β€” was incorrectly wrapped in a `
`, now returns `` directly - βœ… Matches rendering pattern of all other icon components (Delete, Download, etc.) - βœ… Resolves icon size mismatch that caused visual inconsistency in the action buttons row --- ## [2.0.2](https://github.com/files-ui/files-ui-react/releases/tag/2.0.2) (2026-07-28) ### ✨ Major Release β€” Headless Architecture, Server Actions & RSC Boundaries **πŸŽ‰ Summary** v2.x is a fully backward-compatible major release. All existing component APIs continue to work unchanged. The new capabilities are opt-in. --- ### πŸ†• New Features #### 🎯 Headless Hook β€” `useFilesUI` A framework-agnostic hook that extracts all validation, upload orchestration, and state management from `` and ``. Use it to build fully custom upload UIs without any of the library's default styling. ```tsx import { useFilesUI } from "@files-ui/react"; function MyCustomUploader() { const { files, isUploading, uploadFiles, getDragHandlers, getInputProps } = useFilesUI({ accept: "image/*", maxFileSize: 5 * 1024 * 1024, url: "/api/upload", }); return (
); } ``` --- #### πŸš€ Server Actions β€” `action` prop Native Next.js 16 App Router Server Actions support. Pass a Server Action directly to `` or `` β€” no manual `fetch()` calls required. ```tsx // app/actions/upload.ts "use server"; export async function uploadFile(formData: FormData) { const file = formData.get("file") as File; return { success: true, message: `Received ${file.name}` }; } // app/upload/UploadPanel.tsx "use client"; import { Dropzone } from "@files-ui/react/client/dropzone"; import { uploadFile } from "../actions/upload"; export default function UploadPanel() { return ; } ``` **New Core Exports:** - πŸ“€ `uploadExtFileViaAction(extFile, action, uploadLabel?)` β€” uploads a single file via Server Action - πŸ“€ `uploadExtFilesViaAction(extFiles, action, uploadLabel?, maxConcurrency?, onFileComplete?)` β€” uploads multiple files --- #### 🎯 RSC Client Boundaries Each interactive component now ships a dedicated client-only import path for safe use in Next.js 16 App Router without accidentally pulling browser code into Server Components. ```tsx import { Dropzone } from "@files-ui/react/client/dropzone"; import { FileInputButton } from "@files-ui/react/client/file-input-button"; import { FileCard } from "@files-ui/react/client/file-card"; import { FileMosaic } from "@files-ui/react/client/file-mosaic"; import { Avatar } from "@files-ui/react/client/avatar"; import { FullScreen } from "@files-ui/react/client/full-screen"; ``` βœ… The root import `from "@files-ui/react"` continues to work for non-Next.js consumers. **New Named Exports in Root:** - `DropzoneClient`, `DropzoneContainer` - `FileInputButtonClient`, `FileInputButtonContainer` - `FileCardClient`, `FileCardContainer` - `FileMosaicClient`, `FileMosaicContainer` - `AvatarClient`, `AvatarContainer` - `FullScreenClient`, `FullScreenContainer` --- #### 🎨 Font Loading Behavior (Poppins Opt-in) **Changes:** - βœ… Removed automatic Google Fonts `@import` from component stylesheets - βœ… Updated font declarations to use fallback stack: ```css "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif ``` - βœ… Consumers who want `Poppins` should load it explicitly in their application - πŸ“š Added documentation: [`docs/react/Fonts.md`](./docs/react/Fonts.md) **Global `fontFamily` Config via `FilesUiProvider`** - βœ… Added `fontFamily` prop to `FilesUIConfig` - βœ… When set, injects a single `