<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<title>Box Content Sidebar</title>
<!-- Latest version of the sidebar css for your locale -->
<link
rel="stylesheet"
href="https://cdn01.boxcdn.net/platform/elements/{VERSION}/en-US/sidebar.css"
/>
</head>
<body>
<div class="container" style="height:600px"></div>
<!-- Latest version of the sidebar js for your locale -->
<script src="https://cdn01.boxcdn.net/platform/elements/{VERSION}/en-US/sidebar.js"></script>
<script>
var fileId = "123";
var accessToken = "abc";
// At least one of the sub-sidebars (details, activity feed, skills, metadata) need to be turned on for something to render. Details is iteself further divided into notices, properties, access stats and versions, one of which need to be enabled for the details sidebar to render.
var sidebar = new Box.ContentSidebar();
sidebar.show(fileId, accessToken, {
container: ".container",
detailsSidebarProps: {
hasNotices: true,
hasProperties: true,
hasAccessStats: true,
hasVersions: true
},
hasActivityFeed: true,
hasSkills: true,
hasMetadata: true
});
</script>
</body>
</html>