Documentation menu · Input
Input

GlassFileUpload

A file upload zone with drag-and-drop.

Live previewProduction package import

#Overview

Loading preview
Status
live
Category
Input
Package
aura-glass

#Install and Import

Install the package once, import the component from the public entry, and load styles a single time at the app root.

shell
npm install [email protected]
import
import { GlassFileUpload } from 'aura-glass/compat'
styles
import 'aura-glass/styles.css';

#Examples

Three baseline shapes flagship components use across docs and AI-agent guidance:

Basic

tsx
import { FileUpload } from 'aura-glass';
import 'aura-glass/styles.css';

export function UploadExample() {
  return (
    <FileUpload
      contained
      compact
      showActions
      defaultFiles={[]}
    />
  );
}

Production

tsx
import { GlassFileUpload, Card } from 'aura-glass';
import 'aura-glass/styles.css';

export function GlassFileUploadSurface() {
  return (
    <Card>
      <GlassFileUpload
        aria-label="Input production surface"
      />
    </Card>
  );
}

Contained

tsx
import { GlassFileUpload, Card } from 'aura-glass';
import 'aura-glass/styles.css';

export function GlassFileUploadContainedPreview() {
  return (
    <Card style={{ maxWidth: 420 }}>
      <GlassFileUpload />
    </Card>
  );
}

#Accessibility

Label the dropzone, expose selected files as text, and provide keyboard-accessible remove and retry actions.

#SSR and Performance

Do not process large files on every render. Keep previews bounded and move uploads to app-owned handlers.

#Theming

Theme with public props, `className`, `style`, and AuraGlass CSS variables. Avoid private DOM selectors so the component can upgrade with the package.