::file-selector-button
Widely availableSince 202197% of users
A pseudo-element that targets the button part of an '<input type="file">' element, allowing you to style the 'upload' button directly.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since April 2021. Widely available since October 2023.
See how modern your own CSS is.Check your CSS →
Quick example
input::file-selector-button {
background-color: #3b82f6;
color: white;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
}::file-selector-button browser support
BaselineWidely availableThis 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.
Usage97%of people can use this3% use a browser without it.
Browsers
89+
82+
14.1+
89+Mobile
89+Android
82+Android
14.5+iOS