Common
See the commonly used shared properties across embedded Flatfile.
All wrapper SDKs take the following shared properties. It’s recommended to start with the defaults in the Guides, then come back here to make customizations.
Authenticate
publishableKey
Publishable key accessed via Flatfile dashboard > Developer settings.
Identify
While setting up embedded Flatfile, you have the option to either establish a fresh Space during each initialization or reuse an existing Space. These properties specifically apply when creating a new Space.
userInfo
Additional metadata to be passed to the space as it’s created
Look & Feel
name
Name of the space
themeConfig
Theme values for the Space, sidebar and data table.
Theme your Space to create a custom look and feel to match your brand using the actual CSS variables referenced in the app. See all options in our Theming Reference.
spaceBody
Pass in space options to configure a new Space. Find all available parameters for spaceBody in the API Reference.
sidebarConfig
Sidebar config values to toggle UI elements
Within the sidebar, you can set the default page, hide or show the sidebar, and hide or show the data checklist.
If multiple values are provided for defaultPage, it with prioritize in the following order: Sheet, Workbook, Document, Checklist.
Property | Type | Description |
---|---|---|
defaultPage | { documentId?: string, workbook?: { workbookId: string, sheetId?: string }, checklist?: boolean } | Landing page upon loading a Space. Defaults to primary Workbook. |
showDataChecklist | boolean | Toggle data config for Space. Defaults to false. |
showSidebar | boolean | Determines if a guest can see the sidebar. If the sidebar is hidden and there are multiple Workbooks in your Space, please specify the desired Workbook ID as your defaultPage. |
document
Document to pass to space
Documents, written in Markdown, provide extra clarification and instructions to users of a Space. Each Document will appear in the sidebar of a Space. Standard syntax is supported.
Client-Side Server
These options are available when configuring your Space client-side.
environmentId
Identifier for environment. This is optional with creating a Workbook client-side. The key includes environment-specific configurations.
workbook
Config of the workbook to be created
listener
Event listener for responding to Events.
Configuration
These properties allow you to configure how the importer is mounted, displayed, and closed.
closeSpace
Options for when to close the iframe and a callback function when the session is complete.
This onClose
callback function is called when the ‘operation’ defined in the Action is complete and closes the iframe. It can also be used to perform cleanup actions, such as resetting the state of the parent application or updating the UI.
displayAsModal
Display Flatfile as a full screen modal or inline on the page.
Toggling off this property will update the wrapper css to make the iframe fully inline thereby hiding the close button. All of the child divs will no longer include: .flatfile_displayAsModal
which removes all the dialog styling.
The default width and height of the container can be overriden in style.css
.