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
    • 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
  • Utilities
  • CSS utility classes

CSS utility classes

The following CSS-only classes are provided as helper utilities. They are useful for making micro-adjustments to existing React components.

Scroll utilities have moved

For overflow and scrolling specific utilities, go to

the Scroll documentation page.

Text utilities have moved

For text and typography specific utilities, go to the Text documentation page.

Responsive utilities have moved

For responsive specific utilities, go to the Breakpoint utilities page.

Display

eui-displayBlock className

Changes the element's display property to display: block;

Displaying block
โœ„๐˜—
tsx code block:
โœ„๐˜—<span className="eui-displayBlock"> /* Your content */ </span>

eui-displayInline className

Changes the element's display property to display: inline;

Displaying inline
โœ„๐˜—
tsx code block:
โœ„๐˜—<div className="eui-displayInline"> /* Your content */ </div>

eui-displayInlineBlock className

Changes the element's display property to display: inline-block;

Displaying inline block
โœ„๐˜—
tsx code block:
โœ„๐˜—<span className="eui-displayInlineBlock"> /* Your content */ </span>

eui-fullWidth className

Changes the element's display property to display: inline-block; and adds width: 100%;

Displaying full width
โœ„๐˜—
tsx code block:
โœ„๐˜—<span className="eui-fullWidth"> /* Your content */ </span>

Vertical alignment

eui-alignTop className

Changes the element's vertical alignment property to vertical-align: top;

Icon is aligned to the top of the text

โœ„๐˜—
tsx code block:
โœ„๐˜—<EuiIcon className="eui-alignTop" type="logoElasticStack" />

eui-alignMiddle className

Changes the element's vertical alignment property to vertical-align: middle;

Icon is aligned to the middle of the text

โœ„๐˜—
tsx code block:
โœ„๐˜—<EuiIcon className="eui-alignMiddle" type="logoElasticStack" />

eui-alignBottom className

Changes the element's vertical alignment property to vertical-align: bottom;

Icon is aligned to the bottom of the text

โœ„๐˜—
tsx code block:
โœ„๐˜—<EuiIcon className="eui-alignBottom" type="logoElasticStack" />

eui-alignBaseline className

Changes the element's vertical alignment property to vertical-align: baseline;

Icon is aligned to the baseline of the text

โœ„๐˜—
tsx code block:
โœ„๐˜—<EuiIcon className="eui-alignBaseline" type="logoElasticStack" />
Edit this page

Previous
Copy
Next
Delay
  • Display
    • eui-displayBlock className
    • eui-displayInline className
    • eui-displayInlineBlock className
    • eui-fullWidth className
  • Vertical alignment
    • eui-alignTop className
    • eui-alignMiddle className
    • eui-alignBottom className
    • eui-alignBaseline className
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with โค by Elastic