npm

@melio-ui/number-input
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

NumberInput

기본

<NumberInput.Root>
  <NumberInput.Field />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus />
    <NumberInput.Minus />
  </NumberInput.ButtonGroup>
</NumberInput.Root>

<NumberInput.Root>
  <NumberInput.Field />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus asChild>
      <button type="button">+</button>
    </NumberInput.Plus>
    <NumberInput.Minus asChild>
      <button type="button">-</button>
    </NumberInput.Minus>
  </NumberInput.ButtonGroup>
</NumberInput.Root>

Disabled

<NumberInput.Root disabled>
  <NumberInput.Field />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus />
    <NumberInput.Minus />
  </NumberInput.ButtonGroup>
</NumberInput.Root>

ReadOnly

<NumberInput.Root readOnly>
  <NumberInput.Field />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus />
    <NumberInput.Minus />
  </NumberInput.ButtonGroup>
</NumberInput.Root>

Min/Max

<NumberInput.Root min={0} max={100} step={5}>
  <NumberInput.Field />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus />
    <NumberInput.Minus />
  </NumberInput.ButtonGroup>
</NumberInput.Root>

Custom(Invalid)

<NumberInput.Root style={{ border: '1px solid', borderColor: 'var(--es-error)' }}>
  <NumberInput.Field style={{ border: 'none', outline: 'none', boxShadow: 'none' }} />
  <NumberInput.ButtonGroup>
    <NumberInput.Plus />
    <NumberInput.Minus />
  </NumberInput.ButtonGroup>
</NumberInput.Root>

Readme

Keywords

none

Package Sidebar

Install

npm i @melio-ui/number-input

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

71.5 kB

Total Files

9

Last publish

Collaborators

  • elle510