import { useState } from "react";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
import { FormField, PasswordInput } from "@godxjp/ui/data-entry";
import { Flex, PageContainer } from "@godxjp/ui/layout";
/**
* PasswordInput — password field with a built-in show/hide eye toggle.
* Always use this instead of ; never add your own
* eye button. Composed only from real @godxjp/ui components.
*/
export default function Demo() {
const [current, setCurrent] = useState("");
const [next, setNext] = useState("");
return (
States
Placeholder, filled, and disabled.
Inherited Input affordances
PasswordInput retains leading/trailing nodes and the explicit clear callback while
preserving its visibility control.
{}}
leadingIcon={L}
/>
T}
/>
ログインフォーム
current-password autoComplete でパスワードマネージャーと連携。
setCurrent(e.target.value)}
placeholder="現在のパスワード"
/>
パスワード変更フォーム
new-password autoComplete で新しいパスワードを設定。
setNext(e.target.value)}
placeholder="新しいパスワード"
/>
);
}