textfield-with-description

PreviousNext
Docs
kanpekiexample

Preview

Loading preview…
registry/examples/textfield/textfield-with-description.tsx
import { Field } from "~/registry/ui/field";
import { Input } from "~/registry/ui/input";
import { TextField } from "~/registry/ui/text-field";

export function TextfieldWithDescription() {
  return (
    <Field.Root render={<TextField type="email" />}>
      <Field.Label>Email</Field.Label>
      <Input placeholder="john@example.com" />
      <Field.Description>
        We'll never share your email with anyone.
      </Field.Description>
    </Field.Root>
  );
}

Installation

npx shadcn@latest add @kanpeki/textfield-with-description

Usage

import { TextfieldWithDescription } from "@/components/textfield-with-description"
<TextfieldWithDescription />