About
A form input for numeric values with built-in validation, min/max constraints, and step controls. Use NumberInput for quantities, measurements, percentages, and similar inputs. Astryx by Meta. Source: https://astryx.atmeta.com/components/NumberInput
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Number Input to your project and fits it to your theme.
Code
How Astryx Number Input is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-number-input.tsx. */
import '@/components/ui/astryx-number-input-utils/astryx-preview.css';
import {useState} from 'react';
import {NumberInput} from '@/components/ui/astryx-number-input';
function OfficialSample() {
const [value, setValue] = useState<number | null>(0);
return (
<div style={{width: '100%'}}>
<NumberInput
label="Quantity"
placeholder="Enter quantity"
value={value}
onChange={setValue}
formatValue={number => `${number} items`}
hasNumberSteppers
/>
</div>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 330}}>
<OfficialSample />
</div>
</div>
);
}















