Home

Awesome

Creating Custom Activities

This is a basic example of how to instantiate a Cisco Spark Space Widget with a custom activity menu option.

**Note: This option is currently only available when using the browser global method.

Initialization Params

window.ciscospark.widget(widgetEl).spaceWidget({
  accessToken: myAccessToken,
  customActivityTypes: [
    {
      // Menu Item Name
      displayName: 'Custom',
      // Internal Name
      name: 'custom',
      // Style for menu button
      buttonClassName: 'custom-activity',
      // Icon name from react-component-icon
      iconClassName: 'icon-call_camera_32',
      // React component to display when selected
      component: CustomActivity,
      // Types of spaces to support
      spaceTypes: ['direct', 'group'],
      // Type of widget (secondary type coming soon)
      type: 'ACTIVITY_TYPE_PRIMARY'
    }
  ],
  toPersonEmail: toPersonEmail
});

Issues