Media picker - Browser
Browser
The Browser
React component enables the user to select local files via the native browser file dialog.
There is two ways of integrating the Browser
component:
You can pass a children factory in a shape of (browse) => React.ReactChild function.
Or by using one of control props
- isOpen?: boolean - when true, the dialog will show when the component is rendered (NOTE: without this value, no dialog will appear unless you use the onBrowserFn hook)
- onBrowserFn?: (browse: () => void) => void - provides a callback to manually invoke the dialog. This can be useful for cases where the action is required outside of React render lifecycle
UsagePropsBrowser Example