::file-selector-button

A pseudo-element that targets the button part of an '<input type="file">' element, allowing you to style the 'upload' button directly.

Quick example

input::file-selector-button {
  background-color: #3b82f6;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

::file-selector-button Browser Support

Widely available Since 2021 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.

Safe to use without fallbacks.

89+
82+
14.1+
89+
ESC