Input NumberCommunity Asset

Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
Open in new window
View RTL
<script setup lang="ts">
const moneyAmount = ref<number>()
const percentageValue = ref<number>()
const unitaryWeight = ref<number>()
const fullNumber = ref<number>()
</script>

<template>
  <nord-stack gap="l">
    <h2 class="n-typescale-l n-font-weight-semibold">Basic Usage</h2>
    <p class="n-color-text-weaker">
      The InputNumber component with default props. Each type uses sensible
      defaults for decimal places and formatting.
    </p>

    <InputNumber
      v-model="moneyAmount"
      type="money"
      label="Money amount"
      hint="2 decimal places, currency symbol"
    />

    <InputNumber
      v-model="percentageValue"
      type="percentage"
      label="Percentage value"
      hint="0-100 range, percent symbol"
    />

    <InputNumber
      v-model="unitaryWeight"
      type="unitary"
      unit-label="kg"
      label="Weight"
      hint="With custom unit label"
    />

    <InputNumber
      v-model="fullNumber"
      type="full"
      label="Quantity"
      hint="Integer only, no decimals"
    />

    <nord-card padding="m" color="neutral">
      <nord-stack gap="s">
        <h3 class="n-typescale-m n-font-weight-semibold">Values:</h3>
        <p><strong>moneyAmount:</strong> {{ moneyAmount }}</p>
        <p><strong>percentageValue:</strong> {{ percentageValue }}</p>
        <p><strong>unitaryWeight:</strong> {{ unitaryWeight }}</p>
        <p><strong>fullNumber:</strong> {{ fullNumber }}</p>
      </nord-stack>
    </nord-card>
  </nord-stack>
</template>

Integration

This community asset is currently only available to use in the New Frontend for Provet.


Troubleshooting

If you experience any issues while using this community asset, please ask for support in the #vet-frontend Slack channel.


Was this page helpful?

YesNo
Send feedback

We use this feedback to improve our documentation.

 
Edit page
Choose therapy brandChoose veterinary brandAbout Nord Design SystemGet support