preskok/ui

File Trigger

Select files, folders, or capture from camera with consistent button semantics.

Installation

pnpm dlx @preskok-org/ui@latest add file-trigger

Usage

import { FileTrigger } from "@/registry/preskok/ui/preskok-ui/file-trigger"
 
export function Example() {
  return <FileTrigger onSelect={() => {}}>Upload</FileTrigger>
}

Props

  • acceptDirectory: boolean — Allow selecting a folder.
  • allowsMultiple: boolean — Select multiple files.
  • defaultCamera: boolean — Open camera when supported.
  • isPending: boolean — Shows a spinner and disables interactions.
  • Inherits all react-aria-components FileTrigger props.