nuxt / nuxt/ui

InputNumber: add leading and trailing slots

Open
#6,580 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Package

v4.x

Description

The InputNumber allows format-options via Intl.NumberFormat(), which works fine for standardized units.
Hover, if we need to append a custom value (e.g a unit like px) this can't be done through formatting. Therefore it'd be useful to provide leading and trailing slots like in other components, or alternatively add an prefix / suffix prop.

Vuetify example

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the InputNumber component and reviewing how its Intl.NumberFormat options and slots are handled, then compare the linked Vuetify example. The work is done when a custom leading or trailing value such as “px” can be rendered alongside the input, either through slots or the agreed prefix/suffix API.

Written by the indexing model from the issue text.

Assessment

Tech stack
tailwindcss, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.