Chonky v2.1.0 Docs
IntroductionInstallation & usageFile Browser demosMigrating from 1.xFAQ
Basics

File Browser handle

You can access the file browser handle by passing a React ref to the FileBrowser component, as shown below. You can see the list of available methods in file browser handle API reference.

import { FileBrowser, FileBrowserHandle } from 'chonky';
const MyFileBrowser = () => {
// `FileBrowserHandle` is an interface exported from `chonky`.
const fileBrowserRef = React.useRef<FileBrowserHandle>(null);
return (
<FileBrowser ref={fileBrowserRef} files={[]}>
{/* ... */}
</FileBrowser>
);
};

Live example below shows the different ways file browse handle can be used.

0 items

If you have a question, want to request a feature or report a bug, please create an issue on GitHub. You can also report inaccurate or unclear documentation on Chonky's Discord server.