Skip to main content
Elastic UI
Elastic UI
Getting startedComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Setup
  • Theming
    • Theme provider
    • Tokens
      • Borders
      • Breakpoints
      • Colors
      • Sizing
      • Typography
    • Color mode
    • High contrast mode
    • Utilities
  • Accessibility
  • Testing
  • Utilities
  • EUI
  • Theming
  • Tokens
  • 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: 4px
โœ„๐˜—
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
4px
โ†ต
๐˜‚๐˜‚
Edit this page

Previous
Theme provider
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