AsterUIDocsv1.0.2

Docs / Component reference

NumberInput

Choose a numeric value in fixed steps. The field can show a unit and limit the permitted range.

Number input example

Install

sh
npx @fierst/ui@1.0.2 add number-input

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/number-input: NumberInput.

Download the registry source for number-input 1.0.2.

API contracts

ts
export function* NumberInput(
  props: {
    id?: string;
    label?: string;
    value?: number;
    defaultValue?: number;
    min?: number;
    max?: number;
    step?: number;
    unit?: string;
    hint?: string;
    disabled?: boolean;
    onChange?: (value: number) => void;
    class?: string;
  },
  ctx: Ctx,
)