NumberInput 数字输入
带步进按钮、精度和前后缀的数字输入。
¥
%
空值是 null。↑↓ 按 step 增减,失焦时按 min / max 和 precision 修正。
安装
pnpm dlx shadcn@latest add https://docs.linasan.cn/r/number-input.json第一次装本站的组件前先在项目里执行一次 shadcn init,详见 安装。
用法
import { NumberInput } from '@/components/form/number-input';
<NumberInput value={qty} onChange={setQty} min={0} max={10} />属性
属性
类型