Skip to main content
Version: 0.9.0

API Reference

Top-Level Exports

Loading with a script element

When you load the library with a script element, the Content SDK components are not ready to configure and use until all of the other assets are loaded. The contentSdkComponents.loaded event is dispatched once it is ready.

<script
async
src="https://cdn.developer.sas.com/packages/content-components/latest/dist/umd/content-sdk-components.js"
></script>
<script>
window.addEventListener('contentSdkComponents.loaded', function () {
// The SAS Content SDK is loaded and ready
});
</script>

Styling Components

The SAS Content SDK components accept CSS styles by setting the "class" or "style" attributes of a component. For example:

<style>
.customClass {
padding-top: 5rem;
}
</style>

<sas-content-area
url="http://my-viya-server.com"
initial-selection-index="0"
selection-mode="single"
class="customClass"
style={{height: "30rem"}}
></sas-content-area>