Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
      • Guidelines
      • Form rows
      • Described form groups
      • Compressed forms
      • Form labels
      • Prepends and appends
      • Form control layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Forms
  • Form layouts
  • Compressed forms

Compressed forms

Also known as editor-style controls, compressed forms and controls were specifically created for use when space is at a premium. They are not intended for use when the form is the main objective of the page. They work best in editor-style applications where form controls are being used to create or edit content on the page.

Do not use compressed and non-compressed form controls in the same form.

To use compressed forms, pass

compressed=true to all form controls.

Loading...

Column layout

Editor-style controls can be displayed in a two column layout for even better use of limited space, just pass display="columnCompressed" to align the labels and inputs side by side.

Loading...

Contextual help

When using compressed, horizontal form styles, it is best not to overload the UI with expansive help text. If it's short and part of the validation, use helpText. However, if it's an explanation of the control, consider wrapping the label with an

EuiToolTip and appending the questionInCircle icon to it.

Loading...

In a popover

Always use the compressed version of forms and elements when they exist inside of a popover.

Loading...

Complex example

This is an example of how to combine compressed form controls with from rows, labels, prepend and appends in a column layout.

Accessibility recommendation

Pay close attention to the patterns of using htmlFor and aria-label. For best results, each form control that is not wrapped in an EuiFormRow should be supplied an id.

Loading...
Edit this page

Previous
Described form groups
Next
Form labels
  • Column layout
  • Contextual help
  • In a popover
  • Complex example
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic