BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/spectrumui/autosize-textarea-form

Autosize Textarea Form

spectrumui/autosize-textarea-form
FreeComponent

component for the Autosize Textarea Form

Install it

npx shadcn@latest add https://ui.spectrumhq.in/r/autosize-textarea-form.json

Source

app/registry/autosize-textarea/usage/autosize-textarea-form.tsxui.spectrumhq.in/r/autosize-textarea-form.json
1"use client";
2
3import { zodResolver } from "@hookform/resolvers/zod";
4import { useForm } from "react-hook-form";
5import * as z from "zod";
6import * as React from "react";
7import {
8 Form,
9 FormControl,
10 FormField,
11 FormItem,
12 FormLabel,
13 FormMessage,
14} from "@/components/ui/form";
15import { toast } from "@/components/ui/use-toast";
16import { AutosizeTextarea } from "@/components/ui/autosize-textarea";
17import { LoadingButton } from "@/components/ui/loading-button";
18import { useState } from "react";
19
20const FormSchema = z.object({
21 bio: z.string().min(10, {
22 message: "Bio must be at least 10 characters.",
23 }),
24});
25
26const DEFAULT_VALUE = {
27 bio: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
28};
29
30const AutosizeTextareaForm = () => {
31 const form = useForm<z.infer<typeof FormSchema>>({
32 defaultValues: DEFAULT_VALUE,
33 resolver: zodResolver(FormSchema),
34 });
35
36 const [isClearBio, setIsClearBio] = useState(false);
37
38 const [loading, setLoading] = React.useState(false);
39
40 function onSubmit(data: z.infer<typeof FormSchema>) {
41 setLoading(true);
42
43 setTimeout(() => {
44 setLoading(false);
45 toast({
46 title: "Your submitted data",
47 description: (
48 <pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
49 <code className="text-white">{JSON.stringify(data, null, 2)}</code>
50 </pre>
51 ),
52 });
53// … truncated

What it pulls in

Other registry items

  • @spectrumui/autosize-textarea-dependecies

Files it writes

  • app/registry/autosize-textarea/usage/autosize-textarea-form.tsx

Facts

Registry
spectrumui
Type
registry:component
Access
Free
Files written
1
Licence
Apache-2.0
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

ui.spectrumhq.in arihantcodes/spectrum-ui on GitHub Raw registry item This item as JSON

More from spectrumui

All 182 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionspectrumuiComponentsFreeno deps
Alert demoalert-1spectrumuiComponentsFree1 dep
Alert 2alert-2spectrumuiComponentsFreeno deps
Alert 3alert-3spectrumuiComponentsFree1 dep
Alert 4alert-4spectrumuiComponentsFree1 dep
Animated Cardanimated-cardspectrumuiComponentsFree1 dep · 2 files
Animated Draweranimated-drawerspectrumuiComponentsFree4 deps
Animated SVG Chartanimated-SVG-chartspectrumuiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex