Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Traitify Widgets

Installing and Initializing The Library

The widgets can be installed through our CDN or npm. Usage through the CDN will maintain backwards compatibility, while the npm library will use semantic versioning.


<script src=""></script>
  Traitify.http.authKey = "Your Traitify public key"; = "";

  Traitify.options.assessmentID = "an assessment id you have generated via a server side client";



npm i --save traitify-widgets


import traitify from "traitify-widgets";

traitify.options.assessmentID = "an assessment id you have generated via a server side client";

Click here to view other classes available to import, such as Http.

Rendering Components

Click here to view available to components, such as the Results.Personality.Type.List.


Traitify.render({Survey: "#dom-id"}); // Render just the Survey in the target element


Traitify.render({Results: "#dom-id"}); // Render just the Results in the target element

Career Component Customizations

Get your careers from a different endpoint

This is useful if you want to get the career results server side and modify the data returned or just want to proxy through your own server. = "/my-career-endpoint";

Change which experience levels are in the filter = [4, 5];

Change how many results to show per page = 10;

Get jobs for your careers = {
  inline: true, // Show the jobs in the list view, otherwise show them in the modal
  path: ({career}) => career && `/my-jobs-endpoint?careerID=${}`, // Can be a string or function
  source: "Indeed" // If no jobs are found, a link displays to Indeed, Monster, or MyNextMove

Render multiple components in specific elements

  "Survey": "#survey",
  "Results": "#results",
  "Results.Career.Container": "#careers",
  "Results.Guide": "#guide",
  "Results.Personality.Type.List": "#personality-types",
  "Results.Personality.Trait.List": "#personality-traits"


  • Components used directly must be wrapped by a Container component
  • The Container can wrap multiple components
  • Container accepts these props
    • assessmentID
    • authKey
    • benchmarkID
    • graphql
    • host
    • locale
    • options
    • profileID
    • version
  • If you've set options in a Traitify instance, pass them as props to the Container
import traitify, {Components} from "traitify-widgets";

export default function Personality({id}) {
  return (
    <Components.Container {...traitify.props} assessmentID={id}>
      <Components.Results />


  • Most components trigger an initialized and updated event
  • Event handlers must be set before the render command or they will not be called
  • Some events may fire multiple times, once for each target specified (such as the Survey and Results)

The widgets are capable of showing multiple kinds of surveys to users in order to satisfy benchmark requirements. To handle the event when all surveys have been finished you should use this event:

Traitify.listener.on("Surveys.finished", (surveys) => {
  console.log("Surveys.finished", surveys);

To handle the event when each survey has been finished, maybe to record total progress in a backend system:

Traitify.listener.on("Survey.finished", ({response}) => {
  console.log("Survey.finished", response);

Here are some other events that can be handled:

Traitify.listener.on("Survey.initialized", () => {

Traitify.listener.on("Survey.updated", () => {

Traitify.listener.on("Survey.updateSlide", ({response}) => {
  console.log("Survey.updateSlide", response);


Internationalization Options

Traitify.options.locale = "en-us";

// Or if the component has already been rendered

Here is a list of the available locales (en-us is the default):

  • Chinese - zh-cn
  • Creole - ht-us
  • Dutch - nl-nl
  • English (GB) - en-gb
  • English (United States) - en-us
  • French (Canadian) - fr-ca
  • French (France) - fr-fr
  • Japanese - ja-jp
  • Norwegian - no-no
  • Portuguese - pt-br
  • Spanish (United States) - es-us
  • Swedish - sv-se

Render a back button to allow users to change answers during the test

Traitify.options.survey.allowBack = true;

Allow the user to click a button to go full screen

Traitify.options.survey.allowFullscreen = true;

Allow the user to view section results section headers

Traitify.options.showHeaders = true;

Render results using specific perspective

* currently only the big-five assessment has perspective content

Traitify.options.perspective = "firstPerson";


Traitify.options.perspective = "thirdPerson";

Render cognitive assessment without timer

Traitify.options.survey.disableTimeLimit = true;


Big Five Hiring Manager Report = "manager";

This report also makes use of a benchmark/recommendation. It will default to the benchmark used to create an assessment. To use a different benchmark, you can pass the ID as an option.

Traitify.options.benchmarkID = benchmarkID;

Big Five Candidate Report = "candidate";

Engage Employee Report = "employee";

Traitify HTTP

We expose our JavaScript api client that you can use to make additional calls to our API from the client side. We make available get, put, and post functions. These methods will use the api key and url you configured when you initialized the Traitify library. Here is an example that returns career matches for a career-deck assessment. Further documentation on the API methods available can be found at

<script src=""></script>
  Traitify.http.authKey = "Your Traitify public key"; = "";

  const assessmentID = "an assessment id you have generated via a server side client";

  Traitify.http.get(`/assessments/${assessmentID}/matches/careers`).then((matches) => {



npm install
npm run dev


npm run build

Tools in Use