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
  • Theming
  • Borders

Borders

The border tokens contain both individual border property values and full shorthand border properties.

Types

euiTheme.border[type] token

These common border types string together the base properties of color, width and style to form common full border properties.

border: 1px solid #E3E8F2
โœ„๐˜—
tsx code block:
โœ„๐˜—css` border: ${euiTheme.border.thin}; `
๐˜‚๐˜‚
โœ„๐˜—โœ„๐˜—
Sample
โ†ฆ
Token
โ†ฆ
Value
โ†ต
ย border.thin
โ†ฆ
border.thin
โ†ฆ
Value
1px solid #E3E8F2
โ†ต
ย border.thick
โ†ฆ
border.thick
โ†ฆ
Value
2px solid #E3E8F2
โ†ต
ย border.editable
โ†ฆ
border.editable
โ†ฆ
Value
2px dotted #E3E8F2
โ†ต
๐˜‚๐˜‚

Color

EUI has one main base color it uses for almost all borders (or calculated borders).

Only form specific borders use the euiTheme.colors.borderBasePlain color token instead.

euiTheme.border.color token

You can apply this color directly to any border-color property.

  • Default is colors.lightShade
  • In high contrast mode, this value becomes colors.fullShade and cannot be overridden.
border-color: #E3E8F2
โœ„๐˜—
tsx code block:
โœ„๐˜—css` border-color: ${euiTheme.border.color}; `

Width

euiTheme.border.width[size] token

These basic properties make up the border thickness which can be used individually or in conjunction withborder.color.

border: 2px dashed #E3E8F2
โœ„๐˜—
text code block:
โœ„๐˜—css` border: ${euiTheme.border.width.thick} dashed ${euiTheme.border.color}; `
๐˜‚๐˜‚
โœ„๐˜—โœ„๐˜—
Sample
โ†ฆ
Token
โ†ฆ
Value
โ†ต
ย border.width.thin
โ†ฆ
border.width.thin
โ†ฆ
Value
1px
โ†ต
ย border.width.thick
โ†ฆ
border.width.thick
โ†ฆ
Value
2px
โ†ต
๐˜‚๐˜‚

Radius

euiTheme.border.radius[size] token

These basic properties make up the corner radii which can be used individually.

border-radius: 6px
โœ„๐˜—
tsx code block:
โœ„๐˜—css` border-radius: ${euiTheme.border.radius.medium}; `
๐˜‚๐˜‚
โœ„๐˜—โœ„๐˜—
Sample
โ†ฆ
Token
โ†ฆ
Value
โ†ต
ย border.radius.small
โ†ฆ
border.radius.small
โ†ฆ
Value
4px
โ†ต
ย border.radius.medium
โ†ฆ
border.radius.medium
โ†ฆ
Value
6px
โ†ต
๐˜‚๐˜‚
Edit this page

Previous
High contrast mode
Next
Breakpoints
  • Types
    • euiTheme.border[type] token
  • Color
    • euiTheme.border.color token
  • Width
    • euiTheme.border.width[size] token
  • Radius
    • euiTheme.border.radius[size] token
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with โค by Elastic