Add components
A new app already includes a styled example with the Fysicl Elements runtime, Button and Input. The CLI keeps those Vue sources, their dependencies and the theme in a tracked vendor directory. Commit that directory and install its dependencies yourself.
Add one component family later, or run ui add without names for every family. Only init app --bare starts without Elements.
fysicl ui list
fysicl ui add dialog --dir contact-tools
fysicl ui add --dir contact-toolsForms, menus and overlays
Use the exact dashboard components: button, input, textarea, checkbox, switch, tabs, dialog, drawer, bottom-sheet, dialog-or-drawer, dropdown-menu, choice-menu, tooltip, popover, slider, color-picker, morph-menu, resource-table, resource-picker, regional selectors, charts and date/time pickers. ChoiceMenu shows a keyboard menu on desktop and a draggable drawer on mobile. DialogOrDrawer uses the same 768px breakpoint. Give overlays a localized title, description and close action. Checkbox and Switch use v-model; Tabs supports arrow keys. DropdownMenu includes checkbox and radio items.
ElementIcon uses @iconify/vue with bundled Lucide data: component icons render during SSR and without network requests. Use your own bundled Iconify data for additional icons. Keep the ISC license with copied sources.
fysicl ui add checkbox switch tabs choice-menu dialog-or-drawer icon
import { ElementCheckbox, ElementSwitch, ElementChoiceMenu, ElementDialogOrDrawer } from '@fysicl/elements'
// <ElementCheckbox v-model="required" />
// <ElementSwitch v-model="published" />
// <ElementChoiceMenu v-model="type" :options="options" label="Question type" />
// <ElementDialogOrDrawer v-model:open="open" title="Settings">…</ElementDialogOrDrawer>Native Fysicl controls
Elements includes generated sources from the actual dashboard components, with the same keyboard behavior, hover, Scritto text, NumberFlow and mobile sheets. Included hashes track source parity. The scaffold already configures its runtime and ElementsProvider.
The runtime receives locale, navigation, reduced-motion preferences and optional colors explicitly from your app. Resources require your authorized loader and a scopeKey that changes with account, installation or workspace. Controls never read a dashboard session or private dashboard endpoint implicitly.
fysicl ui add runtime resource-table resource-picker regional-selectors color-picker chart date-picker date-range-picker time-picker animation
import { createElementsRuntime, ElementsProvider } from '@fysicl/elements/runtime'
// app.use(createElementsRuntime({ locale, scopeKey, resources: authorizedLoader }))
// <ElementsProvider><YourApp /></ElementsProvider>Choose existing information
LiveLink is a shared Fysicl foundation. Integrate it into editing through @, the context menu or Data. Do not present it as a separate app, product tile or top-navigation action. The same source contract can expose information from different products; a Table is one possible source and one possible destination.
Add the livelink family for the same LiveLink selection and source information as Fysicl. Open LiveLinkValuePicker when someone types @, for example. Place the picker inside ElementDropdownOrDrawerContent and the usual ElementsProvider for keyboard and mobile sheet context. People can choose existing content without creating a variable first. LiveLinkValueInspector shows the current value, source and availability.
Supply your LiveLinkValueProvider with the current account/workspace scope, available sources, paged choices and an authorized batch read. The selection is checked again before insertion. Scope changes cancel old requests. The components do not read dashboard sessions or private endpoints, and do not grant read, write or publication permissions.
Values can be text, numbers, booleans, HTTP(S) links, images or hexadecimal colors. Persist the structured source reference and type from the select event. Your app handles saving, refresh and consent before private information becomes public. Labels stay separate from the selected value.
fysicl ui add livelink
import { ElementLiveLinkValuePicker, ElementLiveLinkValueInspector } from '@fysicl/elements/livelink'
import type { LiveLinkValueProvider, LiveLinkValueSelection } from '@fysicl/elements/livelink'
import { ElementButton } from '@fysicl/elements/button'
import { ElementDropdownOrDrawer, ElementDropdownOrDrawerTrigger, ElementDropdownOrDrawerContent } from '@fysicl/elements/dropdown-or-drawer'
// Under your usual ElementsProvider:
// <ElementDropdownOrDrawer>
// <ElementDropdownOrDrawerTrigger as-child><ElementButton>LiveLink</ElementButton></ElementDropdownOrDrawerTrigger>
// <ElementDropdownOrDrawerContent>
// <ElementLiveLinkValuePicker :provider="authorizedValues" :locale="locale" @select="insertReference" />
// </ElementDropdownOrDrawerContent>
// </ElementDropdownOrDrawer>Connect selections
Sources and consumers are independent. Native providers expose Documents, Tables, Cloud, tags, collections and their contents, destinations, Experiences and saved values. Links can offer JSON/APIs, RSS/Atom, readable web content or safe cards. Frames require source permission; private headers remain encrypted on the server. Websites requiring JavaScript or sign-in cannot always be read automatically.
updateCapabilities declares the modes a source actually supports. Live uses emitted changes through watchContent, with no default interval. Sources without push default to manual. interval is always an explicit choice and respects minimumIntervalMs. Optional inspectUrlSource/createUrlSource capabilities add the shared safe link setup; apps supply these with their own authorization.
LiveLinkContentPicker provides the same source chooser and Table preview as Fysicl. People can select a cell, row, column, range or an entire Table. An entire Table includes all tabs. Other sources can offer ordinary values through the same authorized provider contract. Show only locations supported by the source.
Supply discovery and readContent explicitly to the picker. For ElementTableGrid, the optional liveLink provider also identifies the Table and supplies an authorized read for its saved connections. Persist source references and stable target anchors in document.liveLinks. Display fetched values through the runtime projection, without writing them into cells during autosave. Refresh rechecks current permissions; conflicts never overwrite existing data.
Sources with table content return a bounded sparse bundle of tabs, values and optional stable axis identities. Shared structural selections use the original source identities; the preview can use temporary cell identities of its own. The source contract stays independent of the product displaying the data. Always treat source access, writing and publication as separate capabilities.
fysicl ui add tables livelink
import { ElementTableGrid } from '@fysicl/elements/tables'
import type { TableLiveLinkProvider } from '@fysicl/elements/tables'
import { ElementLiveLinkContentPicker } from '@fysicl/elements/livelink'
// Supply your explicitly authorized TableLiveLinkProvider:
// <ElementTableGrid v-model="document" :live-link="authorizedLinks" :locale="locale" />
// Use the same picker from your own @ or contextual editing action.
// Components do not infer private dashboard endpoints.Tables and file previews
Add tables for the same editor as Fysicl Tables: multiple sheets, formulas, ranges, formatting, sorting, filters and clipboard support. Charts, refreshable pivots and conditional formatting use the same native controls. Cells respond immediately without editing animations. Use read-only for previews; your app supplies authorized persistence and autosave.
Add files for responsive file previews, including images, PDF pages, media and text. Supply an explicit FilePreviewProvider for inspection, authorized bytes and downloads. TableProvider describes your authorized storage; components add no app permissions or access to private sessions. Advanced Excel features can differ; retain originals and show conversion warnings.
fysicl ui add tables files account-menu
import { ElementTableGrid, createTableDocument } from '@fysicl/elements/tables'
import type { TableProvider } from '@fysicl/elements/tables'
import { ElementFilePreviewDialog } from '@fysicl/elements/files'
// <ElementTableGrid v-model="document" :read-only="!canEdit" :locale="locale" />Tables and views
ElementResourceTable uses the same full table as the dashboard: view tabs, search and filters, sorting, column visibility and order, selection, your bulk actions and paging. On phones, rows become compact buttons to details. Column labels cycle ascending, descending and default order; arrows appear only while sorted. The rightmost menu controls general sorting. Supply localized labels for columns, filters and default views.
A stable view-key and a scopeKey containing account, installation and workspace identity keep personal views in this browser. Only search, filter, sort and column choices are stored. Without a key or identity, views last for this visit. Storage failures show a notice and preserve current views.
Set hostOrigin explicitly on the Elements runtime and wrap your app in ElementsProvider. Shared dialogs, drawers and menus hide the mobile dashboard bar until every overlay closes. Keep local Save/Done buttons inside overlays.
import { ElementResourceTable } from '@fysicl/elements/resource-table'
// <ElementResourceTable view-key="forms" :rows="rows" :columns="columns"
// :row-key="row => row.id" :views="views" :label="t('forms')"
// :search-placeholder="t('searchForms')" :actions="bulkActions" />Returning and choosing
A stable view-key also remembers the current-visit search, filters, sorting, page, valid selection and scroll position when returning from details. Each account, installation and workspace scope stays separate. Row data and selected IDs are not saved to localStorage for this return state.
Resource pickers show up to five recently chosen resources. Only IDs are stored in the browser; names and artwork are reloaded through your authorized loader. It must support an exact id lookup while preserving current filters and permissions.
Optionally supply createResource to open your authorized creation form. Resolve { id } only after saving, or null on cancellation. The picker checks the saved item again before selecting it. No callback means no creation action. Keep local Save/Done/Cancel buttons; no extra permissions are granted.
import type { ResourceCreator } from '@fysicl/elements/resource-picker'
// const createResource: ResourceCreator = async context => {
// return await openAuthorizedCreationDialog(context) // { id } or null
// }
// <ElementCollectionPicker :create-resource="createResource" />Data and permissions
Read and write permissions are independent for experiences, tags, collections, destinations, profile and workspace. Request only the .read and .write scopes needed in your manifest. Write grants no deletion, publication, billing or membership administration. tags, profile and workspace support read and update; the capability catalog lists available actions.
The SDK uses only the short-lived in-memory launch token. A missing-scope failure identifies required permissions. Add them to the app draft and request a new review and workspace approval; detection grants no access itself. tag_orders is future functionality and is not accepted now.
import { createAppDataClient } from '@fysicl/elements/runtime'
const api = createAppDataClient({ hostOrigin, accessToken: () => token, scopeKey: () => authorizationScope })
const capabilities = await api.capabilities()
const collections = await api.resource('collections').list({ limit: 25 })Update
The CLI tracks hashes of copied files. An update refuses to overwrite a modified vendor directory. Keep app-specific code outside that directory.
fysicl ui update --dir contact-toolsUse connected accounts
Request connectors.read in your app manifest and submit the version for review. This is a separate read permission: connectors.write does not exist and it grants no general create, edit or publication rights.
After installation, a workspace owner opens Settings → Connections, chooses the account and Apps with access. The owner separately approves the actions and information for your exact app version. Without that approval the list is empty. Your app never receives account tokens or client secrets.
Use only the returned grant ID. Read at most 25 results per request and follow nextCursor for more. Unapproved information fields are absent; do not infer URLs or other data from missing fields. Revocation, an installation change or reconnect can stop access immediately. Respect failures and reload the approved list.
Test installations report that account access is unavailable. Account data, scoped publication and real provider consent need separate testing; a working public video example does not prove OAuth access.
Personal connections are separate under Account → My connections. Only their owner can use them privately in the current workspace, when the Fysicl administrator enables personal accounts for that service. They cannot grant access to workspace apps. During connection setup, the owner chooses once which details and optional listening activity may appear in Experiences. Blocks reuse those approved choices without asking again. Existing accounts can review this under Use in Experiences.
const capabilities = await api.capabilities()
if (capabilities.connectors.available) {
const page = await api.connectors.list({ limit: 25 })
const approved = page.connectors.find(connection =>
connection.permissions.some(permission => permission.operation === 'youtube.uploads'))
if (approved) {
const posts = await api.connectors.read(approved.id, {
operation: 'youtube.uploads', limit: 25
}, abortController.signal)
// Render only fields present in posts.items; preserve posts.nextCursor.
}
}