docs(input): add example for maxlength (#3110)

This commit is contained in:
Vann
2025-02-14 23:30:01 +09:00
committed by GitHub
parent 125a28190b
commit 15da5cf71e
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<template>
<UInput
v-model="name"
:maxlength="maxLength"
>
<template #trailing>
<span class="text-xs text-gray-500 dark:text-gray-400">{{ name.length }}/{{ maxLength }}</span>
</template>
</UInput>
</template>
<script setup lang="ts">
const name = ref('')
const maxLength = 10
</script>

View File

@@ -173,6 +173,13 @@ baseProps:
---
::
### Limit
Use the `maxlength` prop to limit the length of the Input.
:component-example{component="input-example-max-length"}
## Slots
### `leading`