Box offers several UI Elements to create common user experiences with files and folders in an application.
The available UI Elements are:
- Box Content Preview - Display interactive viewers for documents, images, audio, video, and more
- Box Content Pickers - Allow users to select files or folders from their Box account
- Box Content Explorer - Allow users to search and browse through files and folders
- Box Content Uploader - Allow users to upload files by selecting or using drag-and-drop
- Box Content Open With - Allow users to open content stored in box with a partner application using an embedded dropdown.
Box UI Elements can be used in isolation or joined together to construct common user flows with content, such as uploading and then viewing a file.
In order to initialize any of the Box UI Elements, you will need to provide a valid Access Token. An Access Token can be obtained when you authenticate your application to Box. We also recommend downscoping your Access Token using the Token Exchange mechanism to avoid passing an Access Token with superfluous permissions to the client.
Box UI Elements only expect an Access Token to be passed in for authentication, and can therefore be used for any type of authentication available from Box Platform.
For testing purposes, you can use a Developer Token as your Access Token. A Developer Token can be generated in the Configuration section in your app's settings in the Box Developer Console. If you would like to use the demos embedded into the documentation, you will need to whitelist codepen.io's origins for CORS - https://s.codepen.io and http://s.codepen.io. This can be done in the Configuration section in your app's settings in the Box Developer Console.
You can learn how to specify a logo for a Box UI Element here.
To start using the Box UI Elements, please visit the documentation for any of the UI Elements listed above.