Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cognite.com/llms.txt

Use this file to discover all available pages before exploring further.

Input

v1.0.0 | View in Storybook · View in Storybook

When to use

  • Use Input fields when you need users to provide specific text-based information, such as assets, name, or other detailed data, which will be processed or stored.
  • Use Input fields in forms or for entering credentials like usernames, passwords, or email addresses.

When to use something else

Dos and don’ts

  • Don’t use long placeholder descriptions that repeat the label name.
  • Don’t repeat the label in placeholder copy.
  • Don’t use placeholder text that could be misunderstood as pre-filled text.
  • Don’t wrap text. Truncate or use a Textarea instead.
  • Don’t use any default filled text as users may overlook it.

Anatomy

  • Leading content: Optional content that appears to the left of the input field. It is not recommended to use multiple leading content items unless it is absolutely necessary.
    • Icon: An optional icon that appears to the left of the input field to help the user understand the context of the input.
    • Prefix: An optional, fixed formatted text that appears to the left of the input field, e.g., a currency symbol.
  • Trailing content: Optional content that appears to the right of the input field. It is not recommended to use multiple trailing content items unless it is absolutely necessary.
    • Button: Helpful for quick actions related to the input, e.g., ‘Copy’ or ‘Search’. A tooltip may be helpful to explain the action.
    • Suffix: An optional, fixed formatted text that appears to the right of the input field, e.g., a unit of measurement.
    • Stepper: Allows the user to increment or decrement a value by a fixed amount.
    • Shortcut: Helpful shortcut key related to the input, e.g., ‘Ctrl + C’ for ‘Copy’. A Tooltip may help explain the shortcut.

Behavior

  • Value updates as the user types unless using a masked or controlled pattern; validation messages should associate with the field for assistive tech.
  • Single-line only: use Textarea when line breaks are expected.

Often used with

Last modified on May 11, 2026