Skip to main content

Get Started

Injecting Tight Embedded

To add the latest release of Tight Embedded to your web app, simply add the following to your HTML <head>:
<script src="https://cdn.prod.tight.com/embedded/latest/tight.js"></script>

Initializing Tight Embedded

To initialize Tight Embedded, you will need to provide the following data parameters:
FieldDescriptionFormat
clientIdYour app’s client_idReach out to api@tight.com to obtain
accessTokenYour user’s access_tokenReceived when creating a Company
showAnimationsWhether elements should be animated as they loadBoolean; defaults to true
Simply add this one line of javascript, to be run once after your app’s initialization:
Tight.init({clientId: $(client_id), accessToken: $(access_token)});

Embedding Specific Components

The Embedded experience allows you to embed your choice of Tight components into your app wherever you feel best suits your users. To embed a component, you will need to provide an elementId parameter and the name of the component that you wish to embed by simply invoking the following line of JavaScript, providing the HTML id of the element you wish to render it under, the name of the component you wish to embed, and an options object specific to the component.
Tight.renderScreen(elementId, 'componentName', options)
You can find the numerous components under the left-hand navigation pane of the Plain Javascript pages documentation.

Options

Mobile browser support

To render the mobile version of Tight Embedded in your mobile web app, simply add viewport: "mobile"to the data parameters:
Tight.init({clientId: $(client_id), accessToken: $(access_token), viewport: "mobile"});
Note: if you would like Tight to auto-detect whether it should render the desktop or mobile viewport, set viewport: "auto".

Read-Only View

Sometimes, you’ll want to limit a user’s ability to make changes. You can disable their ability to make changes on a per-screen basis with the readOnly option. Set the option to true when calling Tight.renderScreen on the screen you want to be read-only.
JavaScript
Tight.renderScreen(elementId, 'componentName', { readOnly: true })

Embedding a Specific Release

Tight Embedded follows a semantic versioning numbering scheme, major.minor.patch. To use a specific release version, you can replacelatest with the version number you wish to use. Thus, to use version 1.2, embed:
HTML
<script src="https://cdn.prod.tight.com/embedded/1.2/tight.js"></script>
In your sandbox environment, Tight recommends using:
<script src="https://cdn.sandbox.tight.com/embedded/latest/tight.js"></script>