Input Controlled

PreviousNext

input-controlled-demo

Docs
intentuipage

Preview

Loading preview…
components/docs/forms/input/input-controlled-demo.tsx
"use client"

import { useState } from "react"
import { Input } from "@/components/ui/input"
import { Text } from "@/components/ui/text"

export default function InputControlledDemo() {
  const [text, setText] = useState("")
  return (
    <div>
      <Input aria-label="Name" value={text} onChange={(e) => setText(e.target.value)} />
      {text && <Text className="mt-6">{text}</Text>}
    </div>
  )
}

Installation

npx shadcn@latest add @intentui/input-controlled-demo

Usage

Usage varies by registry entry. Refer to the registry docs or source files below for details.