Fundação
Componentes
- Componentes
- Accordion
- ActivityGraph
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- AvatarGroup
- Badge
- Box
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Connector
- Container
- Context Menu
- Dialog
- Drawer
- DropdownMenu
- Empty
- EnvEditor
- Fade In
- Field
- Fps
- Hover Card
- Highlighter
- Input
- InputGroup
- Input OTP
- Item
- JSONViewer
- Kbd
- Label
- Marquee
- Menubar
- Native Select
- Navigation Menu
- NumberInput
- Pagination
- Popover
- Preview Card
- Progress
- ProgressiveBlur
- Radio Group
- Resizable
- Retro Grid
- Scan Line
- ScrollArea
- Scrubber
- SectionLabel
- Select
- Separator
- Sheet
- Signature
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stagger Group
- StatusDot
- SystemBanner
- Switch
- Table
- Tabs
- TagInput
- Textarea
- ThemeToogle
- Toggle
- Toggle Group
- Tooltip
- Typing Effect
Campo numérico com botões − / +, teclas ↑ / ↓, limites opcionais min / max e step. Está em @zexon/ui/components/number-input. Podes usar value + onChange (controlado) ou defaultValue (não controlado). Com allowEmpty, o utilizador pode apagar o valor e onChange recebe undefined.
Importação
import { NumberInput, type NumberInputProps } from "@zexon/ui/components/number-input";
Uso
Exemplo
Variante HUD
variant="hud" — moldura única à volta do controlo e dos botões.
HUD
Props
| Prop | Tipo | Predefinição | Notas |
|---|---|---|---|
value | number | — | Modo controlado |
defaultValue | number | — | Modo não controlado |
onChange | (value: number | undefined) => void | — | |
min | number | — | Piso (clamped) |
max | number | — | Tecto (clamped) |
step | number | 1 | Incremento dos botões e setas |
allowEmpty | boolean | false | Campo vazio permitido |
variant | "default" | "hud" | "default" | Estilo tático com colchetes |
disabled | boolean | — | |
className | string | — | Contentor externo |
Demais atributos de <input> repassam-se ao campo (exceto type, value, onChange).
Anterior:
Próximo: