Skip to content
AJS InnovationsUI

Patterns

File upload

A template-selection area with file type and size validation.

Maximum file size: 1024 KB

Interactive local example · fictional data

The Code tab contains this preview’s complete source, including sample data and interaction state. Load the package stylesheet and Switzer font as described in the installation guide. Additional layout utilities require Tailwind CSS in your application.

API reference

PropTypeDefault
labelstringrequired
acceptstring"image/*"
maxBytesnumber1048576
onFileChange(file: File | null) => void
disabledbooleanfalse

Primitives also accept their underlying HTML or Radix props. Full types are included with the package.

Behavior & accessibility

  • Selection stays local; the component does not upload data.
  • Keyboard users can focus the native file input. Validation errors are announced.

Reference

Admin ID-card and referral template settings