INTERACTIVE EXAMPLE
Icon-Only Upload
A compact, icon-only upload button without text. Ideal for toolbars, chat inputs, and space-constrained layouts.
What you should see: a browse control reduced to a single icon for toolbars. The button still carries an accessible name, so a screen reader announces what it does rather than just “button”.
Click the icon to upload
Toolbar Example
<style>
.icon-only .cu-select-btn {
width: 2.5rem; height: 2.5rem; padding: 0; font-size: 0;
display: inline-flex; align-items: center; justify-content: center;
}
.icon-only .cu-select-btn::before {
content: ""; width: 1.125rem; height: 1.125rem; background: currentColor;
mask: var(--cu-dropzone-glyph) center / contain no-repeat;
}
</style>
<div class="icon-only">
<core-upload asp-upload-url="/api/upload/upload"
asp-multiple="true"
asp-progress="true"
asp-auto-upload="true"
asp-button-text=""
asp-button-label="Upload files">
</core-upload>
</div> A button with no label
asp-button-class puts your classes on the trigger and asp-button-text sets its label, so an icon-only button is a matter of your CSS and an empty or symbolic label. It suits a toolbar or a table row where the surrounding context already says what the control does.
Give it an accessible name
An icon with no text needs an aria-label and a tooltip. Without them the button is unusable with a screen reader, and the meaning of a paperclip is a convention rather than a certainty even for sighted users.