Skip to content

Instantly share code, notes, and snippets.

@orefalo
orefalo / TextareaAutosize.svelte
Created January 15, 2025 07:25
shadcn-svelte TextareaAutosize.svelte
<script lang="ts">
import type { WithElementRef, WithoutChildren } from 'bits-ui';
import type { HTMLTextareaAttributes } from 'svelte/elements';
import { Textarea } from '$lib/components/ui/textarea/index.js';
import { cn } from '$lib/utils.js';
import { nanoid } from '$lib/nanoid';
let {
value = $bindable(),
class: className,