Skip to content

Ap-InputNumber

InputNumber is an input component to provide numerical input.

Example

ts
    <apInputNumber v-model="exampleNumber" />

TIP

You can use v-model for bidirectionnal

Or use :modelValue and listen @update:modelValue

Props

NameTypeDefaultRequired
modelValueNumbernullfalse
size'small', 'medium', 'large'mediumfalse
stepBooleanfalsefalse
disableBooleanfalsefalse
disabledBooleanfalsefalse
prefixStringnullfalse
suffixStringnullfalse
minNumbernullfalse
maxNumbernullfalse

Size

vue
<template>
    <Ap-InputNumber size="small" v-model="refNumberSmall"/>
    <Ap-InputNumber v-model="refNumberMedium"/>
    <Ap-InputNumber size="large" v-model="refNumberLarge"/>
</template>

<script setup lang="ts">
import { ref } from 'vue';

    const refNumberSmall = ref()
    const refNumberMedium = ref()
    const refNumberLarge = ref()
</script>

Step

ts
    <apInputNumber v-model="exampleNumber" :step="0.1"/>

Prefix and Suffix

ts
<apInputNumber v-model="value2" prefix="&#x21C5; " suffix="%" :min="0" :max="100" />