Skip to main contentCarbon Design System

Read-only states

Read-only states are applied to components when the user is allowed to review but not modify the component. It removes all interactive functions from the component.

Overview

A read-only state is applied only to components the user can modify when toggled to enabled. Read-only states are considered active, and the data they contain can be used in an application’s processes. This state change transforms a component’s purpose to be purely informative rather than interactive.

Form component read-only states in context.

Form component read-only states in context.

When to use

There are three main use cases that initiate a read-only state:

Use caseDescription
Application processAn application’s process temporarily restricts a user from modifying the component until the process completes.
LockedAn application restricts the number of users that can modify the component at the same time. 
PermissionsA user’s credentials allow them to view the component but not modify it.

When not to use

  • If the component does not have an enabled state, do not use a read-only state to display static information.
  • As an alternative to a disabled state, read-only and disabled states serve different purposes. For example, when a component is temporarily unavailable pending user actions or decisions (such as completing a form or choosing an option), the component’s state should be temporarily disabled, not read-only.
  • If the component would otherwise be disabled, components in a disabled state should not change to a read-only state.

Formatting

Anatomy

Read-only state anatomy.

Read-only state anatomy.

  1. Background color change: Having a transparent background for fields.
  2. Border color change: De-emphasizing selection and clickability to make information more readable.
  3. Text color no change: Text color remains the same as in the enabled state and should still pass 4.5:1 color contrast rules.
  4. Icon color change: Keeping embedded icons in the component for context but displaying that icons are not interactive with color and cursor changes.

Visual guidance

Read-only states use subtle changes to a component’s style to emphasize critical information and de-emphasize or remove icon signifiers.

Structure

Components should maintain the same structure and spacing used in the component’s enabled state. In most cases, elements in the enabled state are present in the read-only state.

Selection controls

Selection controls offer users a selection from pre-determined options. Common selection controls include: checkboxes, radio buttons, toggles, dropdowns, selects, combo boxes, and multiselects.

Read-only states for selection controls.

Read-only states for selection controls.

Bound entry controls

Bound entry controls allow users to input numeric data, like dates, times, and numeric values. Common bound entry controls include: number inputs, sliders, date pickers, and time pickers.