cpn-basic-upload

Configure the UDesign Upload component in React with merged native props.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-upload
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpn-basic-upload
Source: https://github.com/UCloud-FE/udesign-cli/tree/main/skills/cpn-basic-upload
Command: npx skills add https://github.com/UCloud-FE/udesign-cli --skill cpn-basic-upload

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps AI correctly configure and use the UDesign Upload component by ensuring any extra native props (like style, className, etc.) are automatically attached to the outer container. When Upload is needed, load this Skill to ensure consistent behavior across apps.

Core Features & Use Cases

  • Prop merging: automatically attaches extra props to the outer div.
  • Use-case guidance: covers single and multi-upload scenarios, onAdd/onRemove handling, and review of listType, accept, maxSize, and disabled configurations.
  • Best practices: enforces avoiding external UI libraries and recommends importing Upload from @ucloud-fe/react-components.

Quick Start

Load this Skill before integrating Upload in a React project to ensure prop merging and usage guidelines are followed.

Frequently Asked Questions about cpn-basic-upload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure extra native props like style on a React Upload component?

To configure extra native props on a React Upload component, you must ensure they are automatically merged and attached to the outer container div. This guarantees consistent styling and behavior across your application without altering internal component logic.

What is the correct way to handle single and multiple file uploads in React?

Handling single and multiple file uploads in React requires configuring event handlers like onAdd, onRemove, and onChange. You also need to review listType, accept, maxSize, and disabled options to manage file selection limits and user interactions properly.

How do I import the UDesign Upload component without TypeScript types?

To import the UDesign Upload component without TypeScript types, write standard JS/JSX code and import Upload directly from @ucloud-fe/react-components. This enforces safe usage patterns and avoids requiring external UI libraries for your project setup.

Can I use external UI libraries alongside the UDesign Upload component?

You cannot use external UI libraries alongside the UDesign Upload component. Best practices enforce avoiding them entirely to maintain safe usage patterns, ensuring consistent behavior by relying solely on the @ucloud-fe/react-components package for rendering logic.

Why does my React file upload configuration ignore custom className attributes?

Your React file upload configuration ignores custom className attributes because extra native props must be explicitly merged into the outer container. Applying this prop merging pattern ensures your custom styles attach correctly to the outer div element.

What are the available event handlers for file preview and removal in React upload?

Available event handlers for file preview and removal in React upload include onPreview and onRemove. You configure these alongside onChange and onAdd to manage file lifecycle events, ensuring proper user interaction within single or multiple upload scenarios.