You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request a feature enhancement for the CldUploadWidget component in the next-cloudinary package. Currently, the CldUploadWidget relies on opening a popup/modal to handle file uploads, which works well in many scenarios. However, there are situations where developers might prefer to have the widget's functionality directly embedded into their custom UI without triggering a separate popup/modal.
Proposed Feature
Add support for rendering the CldUploadWidget inline as part of the DOM instead of requiring a popup. This would allow developers to integrate the upload functionality seamlessly within their custom components.
Use Case
Custom Modal/Layouts: Developers may have custom modals or layouts and want to include the CldUploadWidget functionality directly within those modals without rendering two separate modal layers.
Improved UX: By embedding the widget inline, users can experience a more cohesive UI, especially when working with upload features in complex forms or custom dashboards.
Enhanced Flexibility: This feature would give developers more control over the UI and enable scenarios where a popup is not ideal.
Possible Implementation
Add an inline or renderInline prop to the CldUploadWidget component.
When this prop is enabled:
Render the widget's content inline instead of invoking the Cloudinary modal.
Expose hooks or callbacks for upload operations (onUpload, onError, onComplete, etc.), similar to the existing widget API.
Ensure compatibility with the existing functionality to avoid breaking changes.
Examples of Expected Usage
import{CldUploadWidget}from"next-cloudinary";constInlineUploader=()=>{return(<div><h2>Upload Your Media</h2><CldUploadWidgetuploadPreset="your-upload-preset"inline// New prop to render widget inlineonUpload={(result)=>console.log("Upload completed:",result)}options={{sources: ["local","url","camera"],// Existing sourcesmultiple: true,theme: "minimal",// Optional, to keep the UI compact}}/></div>);};exportdefaultInlineUploader;
Additional Notes
This feature would align with developers' growing need for customizable and embedded solutions in modern web applications.
Similar flexibility exists in other SDKs and would enhance the overall usability of the next-cloudinary library.
The text was updated successfully, but these errors were encountered:
Description
I would like to request a feature enhancement for the
CldUploadWidget
component in the next-cloudinary package. Currently, theCldUploadWidget
relies on opening a popup/modal to handle file uploads, which works well in many scenarios. However, there are situations where developers might prefer to have the widget's functionality directly embedded into their custom UI without triggering a separate popup/modal.Proposed Feature
Add support for rendering the
CldUploadWidget
inline as part of the DOM instead of requiring a popup. This would allow developers to integrate the upload functionality seamlessly within their custom components.Use Case
CldUploadWidget
functionality directly within those modals without rendering two separate modal layers.Possible Implementation
CldUploadWidget
component.Examples of Expected Usage
Additional Notes
The text was updated successfully, but these errors were encountered: