nuxt / ui

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

Add input-number component #1462

Open bbhxwl opened 7 months ago

bbhxwl commented 7 months ago

Description

image

Additional context

No response

bbhxwl commented 7 months ago

Limit the values of min and max.

MiroslavGubenko commented 2 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.