mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 14:08:06 +01:00
docs(input): add examples
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
const value = ref('')
|
||||
const maxLength = 15
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UInput
|
||||
v-model="value"
|
||||
:maxlength="maxLength"
|
||||
aria-describedby="character-count"
|
||||
:ui="{ trailing: 'pointer-events-none' }"
|
||||
>
|
||||
<template #trailing>
|
||||
<div
|
||||
id="character-count"
|
||||
class="text-xs text-[var(--ui-text-muted)] tabular-nums"
|
||||
aria-live="polite"
|
||||
role="status"
|
||||
>
|
||||
{{ value?.length }}/{{ maxLength }}
|
||||
</div>
|
||||
</template>
|
||||
</UInput>
|
||||
</template>
|
||||
Reference in New Issue
Block a user