Skip to content

Numeric stepper

A numeric variant of certara-input with magnitude-aware (“log”) stepping and a certaraStep event that fires when the value changes via a stepping gesture. It shares certara-input’s markup, form participation and validation through the common InputController, implementing only the numeric-specific behavior hooks.

HTML
React
Angular
<certara-input-numeric step="10" value="50" />
import { CertaraInputNumeric } from '@certara/certara-ui-react';
<CertaraInputNumeric step={10} value={50} />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-input-numeric step="10" value="50"></certara-input-numeric>

Set variant="complex" to show built-in − / + stepper buttons.

HTML
React
Angular
<certara-input-numeric variant="complex" step="10" value="50" />
import { CertaraInputNumeric } from '@certara/certara-ui-react';
<CertaraInputNumeric variant="complex" step={10} value={50} />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-input-numeric variant="complex" step="10" value="50"></certara-input-numeric>
HTML
React
Angular
Steps by orders of magnitude
<certara-form-group label="Amount" layout="stacked">
<span slot="help">Steps by orders of magnitude</span>
<certara-input-numeric step-type="log" require-valid-step="false" value="240">
</certara-input-numeric>
</certara-form-group>
import { CertaraFormGroup, CertaraInputNumeric } from '@certara/certara-ui-react';
<CertaraFormGroup label="Amount" layout="stacked">
<span slot="help">Steps by orders of magnitude</span>
<CertaraInputNumeric stepType="log" requireValidStep={false} value={240}>
</CertaraInputNumeric>
</CertaraFormGroup>
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-form-group label="Amount" layout="stacked">
<span slot="help">Steps by orders of magnitude</span>
<certara-input-numeric step-type="log" require-valid-step="false" value="240">
</certara-input-numeric>
</certara-form-group>
HTML
React
Angular
<certara-input-numeric step="10" value="50" />
import { CertaraInputNumeric } from '@certara/certara-ui-react';
<CertaraInputNumeric step={10} value={50} />
// In your module (e.g., app.module.ts)
import { CertaraUiAngularModule } from '@certara/certara-ui-angular';
@NgModule({
imports: [CertaraUiAngularModule]
})
// In your template:
<certara-input-numeric step="10" value="50"></certara-input-numeric>

accept

Attributeaccept
Typestring
Defaultundefined
Requiredfalse
DescriptionAccepted file types. Present for parity with certara-input; not typically used for numeric inputs.

disabled

Attributedisabled
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents user interaction.

max

Attributemax
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMaximum value for the input.

maxlength

Attributemaxlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMaximum number of characters allowed.

min

Attributemin
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionMinimum value for the input.

minlength

Attributeminlength
Typenumber
Defaultundefined
Requiredfalse
DescriptionMinimum number of characters required.

name

Attributename
Typestring
Defaultthis.inputId
Requiredfalse
DescriptionForm control name, used for form submission and validation events.

pattern

Attributepattern
Typestring
Defaultundefined
Requiredfalse
DescriptionRegex pattern the value must match.

placeholder

Attributeplaceholder
Typestring
Defaultundefined
Requiredfalse
DescriptionPlaceholder text shown when empty.

readonly

Attributereadonly
Typeboolean
Defaultfalse
Requiredfalse
DescriptionPrevents editing while allowing selection and copy.

requireValidStep

Attributerequire-valid-step
Typeboolean
Defaulttrue
Requiredfalse
DescriptionWhen false, a step mismatch is not reported as a validation error (all other validation still applies). Useful with stepType="log", where typed values need not align to a single fixed step.

required

Attributerequired
Typeboolean
Defaultfalse
Requiredfalse
DescriptionMarks the field as required for form validation.

size

Attributesize
Type"md" | "sm"
Default'md'
Requiredfalse
DescriptionVisual size variant of the input.

step

Attributestep
Typenumber | string
Defaultundefined
Requiredfalse
DescriptionStep increment for the input.

stepFallbackBase

Attributestep-fallback-base
Typenumber
Defaultundefined
Requiredfalse
DescriptionSizes the stepType="log" step when the current value has no usable magnitude — empty, zero, or not a number (log 0 is undefined).

stepInteger

Attributestep-integer
Typeboolean
Defaultfalse
Requiredfalse
DescriptionKeeps stepType="log" step increments whole (the step size never drops below 1), for whole-number fields such as counts. This bounds the step size, not the value — use min/max to bound the value.

stepType

Attributestep-type
Type"default" | "log"
Default'default'
Requiredfalse
DescriptionStep sizing mode. ‘default’ uses the fixed step increment; ‘log’ sizes the step to the current value’s order of magnitude (24 → 1, 240 → 10, 0.24 → 0.01), so stepping always lands on round numbers.

value

Attributevalue
Typestring
Defaultundefined
Requiredfalse
DescriptionCurrent value of the input.

variant

Attributevariant
Type"complex" | "simple"
Default'simple'
Requiredfalse
DescriptionLayout variant. simple (default) exposes open-ended prepend/append slots. complex replaces those slots with built-in − / + stepper buttons that drive the native incrementer, matching a spinbutton UI.
NameDescriptionBubbles
certaraBlurEmitted when the input loses focus.true
certaraChangeEmitted when value changes from the previous value.true
certaraFocusEmitted when the input gains focus.true
certaraFormControlErrorEmitted when validation state changes. Payload is the error message or empty string when valid.true
certaraInputEmitted on every keystroke.true
certaraStepEmitted when the value changes via a stepping gesture — arrow keys, the native spinner, or the mouse wheel — rather than typing. Payload is the new value.true
NameSignatureDescription
setBlur() => Promise<void>Programmatically blurs the input.
setError(error: string) => Promise<void>Sets a custom error message. This allows consumers to call input.setError('my error message') instead of input.setAttribute('error', 'my error message').
setFocus() => Promise<void>Programmatically focuses the input.
NameDescription
append(simple variant only) Content placed after the input (e.g., buttons, icons).
prepend(simple variant only) Content placed before the input (e.g., labels, icons).