Skip to main content


Sets the form factor of the existing bar. Can be set as a modal (default), or as an inline bar.


// Sets Spotlight's formfactor to inline, and sets Spotlight's parent element
type: "inline",
rootElement: document.querySelector("#foo"),

Method parameters

formFactorConfig Required


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.
rootElementobjectRequired if formFactor is set to 'inline'. The element where the inline CommandBar will render. Can either be the ID of an element on the page, or an Element (e.g., from document.querySelector).