Shared configuration properties used across all Portal SDKs
All Portal SDKs (JavaScript, React, Angular, Vue) share these common configuration properties. These settings control authentication, theming, user identification, and basic Space configuration.It’s recommended to start with the defaults in the SDK-specific guides, then reference this page to customize your implementation.
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.
An optional unique identifier that enables our embedded users to be associated
with a specific actor in flatfile, enabling repeated through the embedded
experience.
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.
Pass in space options to configure a new Space. Find all available parameters
for spaceBody in the API
Reference.
src/client.js
Copy
Ask AI
const flatfileOptions = { publishableKey, //additional props, see Create Space endpoint for all the full list of properties (https://reference.flatfile.com/api-reference/spaces/create) spaceBody: { name: "New Space", namespace: "Red", },};
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.
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.
Copy
Ask AI
const mainDocument = { title: "Getting Started", body: "\n" + "\\\n" + " \n" + "\n" + "---\n" + "\n" + "# Welcome to the Surf Shop!\n" + "\n" + "Please upload your contacts to the Surf Shop using the Files menu on the left.\n",};const flatfileOptions = { publishableKey, document: mainDocument, //additional props};
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.
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.