Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NumberField] Implement NumberField with new API #185

Closed
Tracked by #10
atomiks opened this issue Mar 15, 2024 · 1 comment · Fixed by #186
Closed
Tracked by #10

[NumberField] Implement NumberField with new API #185

atomiks opened this issue Mar 15, 2024 · 1 comment · Fixed by #186
Assignees
Labels
breaking change component: number field This is the name of the generic UI component, not the React module!

Comments

@atomiks
Copy link
Contributor

atomiks commented Mar 15, 2024

Summary

Replaces the NumberInput component.

This is the place to gather ideas, measure interest and discuss the API and implementation details of the NumberField component and hook.

Anatomy

<NumberField>
  <NumberField.Group>
    <NumberField.Input />
    <NumberField.Decrement />
    <NumberField.Increment />
    <NumberField.Scrubber />
  </NumberField.Group>
</NumberField>

Root

Rendered element: div

prop type default description
defaultValue number
id
min number
max number
step number 1
largeStep number 10
required boolean
disabled boolean
invalid boolean
autoFocus boolean
children
readOnly boolean
name string
value number
onChange function
format Intl.NumberFormatOptions

Other props (unnamed):

  • Ability to scrub the input with the wheel
  • Locale for format

Group

Rendered element: div

All div attrs.

Input

Rendered element: <input type="text" />

All input attrs.

Decrement

Rendered element: button

All button attrs.

Increment

Rendered element: button

All button attrs.

Scrubber

Rendered element: span

All span attrs.

Benchmarks

Examples

No response

Motivation

No response

Search keywords: number field, number input

@atomiks atomiks added status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: number field This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 15, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Mar 15, 2024
@colmtuite colmtuite moved this from Backlog to In progress in Base UI Mar 15, 2024
@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 22, 2024

Benchmarks

The benchmark list we maintain on Notion: https://www.notion.so/mui-org/core-Input-Number-component-364825a7bec94381809ac11ff05b4cc0 for this one.

@oliviertassinari oliviertassinari changed the title [NumberField] Implement NumberField with new API [number field] Implement NumberField with new API Mar 22, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Base UI Apr 11, 2024
@michaldudak michaldudak changed the title [number field] Implement NumberField with new API [NumberField] Implement NumberField with new API Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: number field This is the name of the generic UI component, not the React module!
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants