setFormFactor(formFactorConfig)
Sets Spotlight's formfactor, which can be either a modal (default) or inline.
Example
// Sets Spotlight's formfactor to inline, and sets Spotlight's parent element
window.CommandBar.setFormFactor({
  type: "inline",
  rootElement: document.querySelector("#foo"),
});
Method parameters
formFactorConfig Required
object
| Property | Type | Description | 
|---|---|---|
| type Required | 'modal' | 'modal' opens Spotlight as a modal (default behavior), while 'inline' opens Spotlight in the supplied rootElement. If this is set to 'inline',rootElement(see below) must also be passed. | 
| rootElement | object | Required if formFactoris set to 'inline'. The element where Spotlight will render inline. Can either be the ID of an element on the page, or an Element (e.g., fromdocument.querySelector). | 
``