Menampilkan textarea, atau komponen lain yang tampil seperti textarea.
Installation
pnpm dlx kliping@latest add textareaSalin dan tempel kode sumber di GitHub ke project Anda.
Sesuaikan path import dengan struktur project Anda.
Usage
vue
<script setup lang="ts">
import { Textarea } from '@/components/ui/textarea'
</script>
<template>
<Textarea placeholder="Type your message here." />
</template>1
2
3
4
5
6
7
2
3
4
5
6
7
Requirements
Semua dipasang otomatis oleh kliping add; tabel ini untuk Anda yang memasang manual atau memeriksa project.
| Requirement | Value |
|---|---|
| Project | Vue 3.5+, Tailwind CSS v4, alias @ — disiapkan kliping init |
| npm packages | @vueuse/core@^14.4.0 |
| Files | components/ui/textarea/textarea.vuecomponents/ui/textarea/index.ts |
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue? | string | number | — | The initial value when uncontrolled. |
modelValue? | string | number | — | The controlled value. Bind with v-model. |
| Event | Payload | Description |
|---|---|---|
@update:modelValue | [payload: string | number] | Emitted when the value changes. |
| Data attribute | Value |
|---|---|
[data-slot] | "textarea" |
CSS Variables
Token tema yang dibaca komponen ini — ubah nilainya di CSS global (:root dan .dark, lihat Theming) untuk mengubah tampilannya tanpa menyentuh komponennya: --border, --destructive, --input, --muted-foreground, --radius, --ring.
Credits
Berasal dari shadcn-vue (MIT, Copyright (c) 2023 unovue). Rantai lengkapnya di Credits.