nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.15k stars 555 forks source link

Add input-number component #1462

Open bbhxwl opened 9 months ago

bbhxwl commented 9 months ago

Description

image

Additional context

No response

bbhxwl commented 9 months ago

Limit the values of min and max.

MiroslavGubenko commented 4 months ago

Hi. Because of the flexibility you can do something like this: 2024-07-30_09-07

` <UButton icon="i-heroicons-minus" color="gray" @click="value== 1 ? value: value--" />

  <UButton
    icon="i-heroicons-plus"
    color="gray"
    @click="value== 20 ? value: value++"
  />

`

Ps. Yes, it would be nice to have a separate component. Pss. And for some reason my min and max attributes on Input don't work. Maybe it's just broken.