cpn-basic-number-input

Generate UDesign NumberInput usage examples with defaultValue, min, max, and step.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

帮助 AI 正确使用 UDesign NumberInput 组件,确保遵循统一的交互与 API 使用规范。

Core Features & Use Cases

  • 自动生成和演示 NumberInput 的基本用法示例,覆盖 defaultValue、min、max、step 等常用配置。
  • 提供常见场景的实现指南,如表单输入、数量选择及带单位的数值输入,帮助快速集成到应用中。
  • 保持 UI 风格和事件处理的一致性,便于团队协作与设计系统落地。

Quick Start

生成一个包含 NumberInput 基本用法的示例,演示 defaultValue、min、step 的组合以及一个简单的行为触发。

Frequently Asked Questions about cpn-basic-number-input

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

FAQPage Schema
How do I use a React number input component with min, max, and step props?

To use a React number input with min, max, and step, configure these props to constrain user input and define increment intervals. This Skill generates JavaScript examples demonstrating defaultValue, min, max, and step combinations for consistent UI behavior.

What is the correct way to handle number input events in a React form?

Handling number input events in a React form requires attaching relevant event handlers to the component. This Skill provides implementation guides for common scenarios like quantity selection, ensuring event processing aligns with documented UI conventions.

Does this number input component support JavaScript without requiring TypeScript?

Yes, the number input component supports JavaScript without requiring TypeScript. This Skill explicitly aligns with JavaScript coding conventions and omits TypeScript, generating prop usage examples that fit standard JavaScript React projects.

Can I set a default value and limit user input in a React form number input?

You can set a default value and limit user input in a React form number input by combining the defaultValue prop with min and max boundaries. This Skill demonstrates these configurations to satisfy clear API coverage requirements.

What are the limitations of using design system number input components in React?

Limitations of using design system number input components include strict adherence to documented prop APIs and consistent UI behavior rules. This Skill helps avoid convention violations by providing accurate usage guides for JavaScript React implementations.