shadcn.io is an independent project built on shadcn/ui
The title is Create API Key. The field is Key Name, with the placeholder Production API Key, and helper text about where the key will be used. Create Key does not create one.
Put helper text on the field when the label cannot say where the key is used. A longer form belongs in a Dialog. In Solid, Ark UI does not issue the key.
Installation
Anatomy

Usage
<AlertDialog>
<AlertDialogTrigger asChild={props => <Button {...props()} variant="outline">Create API Key</Button>} />
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Create API Key</AlertDialogTitle>
<AlertDialogDescription>
Give your API key a descriptive name to help you identify it later.
</AlertDialogDescription>
</AlertDialogHeader>
<Field>
<FieldLabel>Key Name</FieldLabel>
<Input name="key-name" placeholder="Production API Key" type="text" />
<FieldDescription>
Use a name that describes where this key will be used.
</FieldDescription>
</Field>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogClose asChild={props => <AlertDialogAction {...props()}>Create Key</AlertDialogAction>} />
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>FAQ
What should the helper text say?
What helps people get it right: purpose, format or limits. Use a name that describes where this key will be used beats repeating the label.
Helper text or placeholder?
Both. The placeholder shows an example, Production API Key, and disappears as people type; the description stays visible, so put requirements there.
How long should it be?
One short sentence. If it needs more, the input is probably too complex for a dialog.
How is the field built?
A Field with FieldLabel, the Input and a FieldDescription under it. The field ties the label and description to the input, so screen readers announce both.
API Reference
Alert Dialog
Sets asChild and props. The rest is on the Alert Dialog page.
Button
Sets props and variant="outline". The rest is on the Button page.
Field
No extra props in this demo. The rest is on the Field page.
Input
Sets name="key-name", placeholder="Production API Key" and type="text". The rest is on the Input page.





