import { useState } from "react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { FormField, TagInput } from "@godxjp/ui/data-entry"; import { Flex, PageContainer } from "@godxjp/ui/layout"; /** * TagInput — free-form multi-value chips input. value is string[] (NOT string). * Enter or comma commits a tag; Backspace on empty removes the last chip. * Use Select (multiple, with showSearch) instead when the set of values is fixed. * Composed only from real @godxjp/ui components. */ export default function Demo() { const [invoiceTags, setInvoiceTags] = useState(["営業部", "Q1"]); const [skillTags, setSkillTags] = useState(["経理", "仕訳入力"]); const [recipientEmails, setRecipientEmails] = useState([]); return ( 請求書ラベル Controlled via value/onValueChange (string[]). Deduplicate is built in. Use for ad-hoc record labels. 担当者スキルタグ name= emits a hidden comma-joined input for native form submission without JS wiring. 承認通知メール送信先 Uncontrolled start (empty defaultValue); caller receives full updated array on each change. 無効状態 disabled dims the whole control and drops the remove buttons; the container is marked aria-disabled so the dimmed chips are treated as an inactive control (no contrast failure). ); }