Skip to content
Ink
Esc
↑↓navigate↵open⌘Jpreview
On this page

Fields

Show a labelled value.

Example

import { Field, Screen } from "ink";

export default function Settings() {
  return <Screen title="Settings">
    <Field label="Units" href="/units">Metric</Field>
    <Field label="Location">London</Field>
  </Screen>;
}

Use href to open an editing page, or onPress for an action. Place the input on the editing page.

Units and Location fields with their current values.

Long values

Values wrap automatically.

A saved location value wrapping over multiple lines.