Skip to content

Frontend SDK reference

Components, composables, and types exported from @morscherlab/mint-sdk. Each entry has a one-line description and a source link. For full prop / type signatures, the TypeScript source is authoritative — type-aware editors give you immediate completion.

Components

About 90 Vue 3 component exports. Source: packages/sdk-frontend/src/components/.

Layout

ComponentUse
AppLayoutPage shell with optional topbar/sidebar slots
PluginWorkspaceViewPlugin page shell used by the current mint init frontend scaffold
AppContainerStandalone container without top bar (login, setup)
AppTopBarPlatform top bar component
AppSidebarSectioned sidebar
AppAvatarMenuUser avatar + menu
AppPluginSwitcherInter-plugin switcher widget

Forms

ComponentUse
BaseButtonPrimary button — variant, size, loading, disabled
BaseInputText / number input; pair with FormField for label / hint / error text
BaseSelectThemed <select> with options array; pair with FormField for label
BaseCheckboxSingle checkbox
BaseRadioGroupGrouped radio buttons
BaseSliderRange slider
BaseTextareaMulti-line input
BaseToggleBoolean switch
NumberInputNumeric input with stepper
MultiSelectMultiple-choice select
DatePicker, DateTimePicker, TimePicker, TimeRangeInputDate/time inputs
CalendarCalendar widget
TagsInputFree-text tag input
SegmentedControlCompact tab-like option selector

Modals and feedback

ComponentUse
BaseModalStandard modal dialog
BaseTabsTab strip + panels
ConfirmDialogConfirm-or-cancel dialog controlled with v-model
AlertBoxInline banner (info / warning / error / success)
AppToastContainerToast host component registered by the SDK install plugin
TooltipHover-triggered tooltip
EmptyStateEmpty-list placeholder
LoadingSpinnerSpinner
ProgressBarLinear progress
SkeletonLoading skeleton
BasePillCompact label / status pill
StatusIndicatorColored dot for status

Data display

ComponentUse
DataFrameSortable / sticky table
AppContainer, CollapsibleCard, ResourceCardCard and panel surfaces
BreadcrumbBreadcrumb trail
ScientificNumberFormatted scientific number
ChartContainerWrapper around chart libraries (Plotly etc.)
DividerHorizontal rule
IconButtonIcon-only button
AvatarUser avatar

Multi-step

ComponentUse
StepWizardMulti-step form with progress indicator

Domain widgets

ComponentUse
WellPlate, PlateMapEditorWell-plate editing
RackEditor, ReagentEditor, ReagentListRack / reagent editing
FormBuilder, FormField, FormActionsSchema-driven forms and form chrome
ChemicalFormula, FormulaInputChemical formula display / input
MoleculeInputMolecule structure input
ConcentrationInput, UnitInputConcentration with units
DoseCalculatorDilution / serial-dilution calculator
ProtocolStepEditorProtocol step editor
SequenceInputDNA / protein sequence input
ScheduleCalendarCalendar / scheduling UI
ExperimentTimelinePer-experiment timeline

Experiment-aware

ComponentUse
ExperimentCodeBadgeFormatted experiment code (LCM-EXP-001, DR-EXP-001, ...)
ExperimentDataViewerPretty-print experiment design + analysis
ExperimentPopoverHover info for an experiment
ExperimentSelectorModalModal picker for experiments

Sample / grouping

ComponentUse
SampleHierarchyTreeHierarchical sample tree
SampleLegendLegend for sample groups
SampleSelectorMulti-sample selector
GroupAssignerManual group assignment UI
AutoGroupModalAuto-grouping modal (driven by useAutoGroup)
BatchProgressListProgress for batch operations

Theming + utilities

ComponentUse
ThemeToggleTheme switcher (Light / Dark / System)
ColorSliderColor picker slider
SettingsModalSettings UI primitive
FileUploaderDrag-and-drop file picker that emits selected File[]
DropdownButtonButton with attached menu
FitPanelFit-to-container panel

For full prop signatures, browse the source or run the local Histoire storybook. For curated live examples, open a page in the Component Library; each component page embeds its own playground.

Composables

60+ typed composables and helper factories. Source: packages/sdk-frontend/src/composables/.

ComposableReturnsPurpose
useApityped fetch helperAuth-aware API calls
useAuthauth actions and token helpersLogin/logout/register flows
usePasskeypasskey registration / loginWebAuthn flows
useThemetheme state + setterTheme switcher
useToasttoast dispatcherUser feedback
usePlatformContextintegration, plugin, user, theme, featuresPlatform shell context
useFormreactive form stateManual form management
useFormBuilderschema-driven form runtimeFormBuilder component
useAsync, useAsyncBatchasync state helpersWrap async operations
useWellPlateEditorplate state + helpersPlate-design UIs
useRackEditorrack stateSample rack UIs
useConcentrationUnitsconcentration mathµM / mg/mL / % conversions
useDoseCalculatordilution mathDose-response calculators
useReagentSeriesdilution seriesDose-response panel building
useChemicalFormulaformula parsing + MWChemical formula display
useSequenceUtilsDNA / protein helpersSequence stats
useTimeUtilstime math + slotsSchedule UIs
useScheduleDragdrag-to-rescheduleCalendar / timeline
useProtocolTemplatesprotocol step engineProtocol UIs
useAutoGroupsample auto-groupingGroup by name prefix
usePluginConfigplugin settingsRead plugin config
createPluginClient, usePluginClientcontract-aware plugin API runtimeGenerated plugin clients
buildPluginEndpointUrl, resolvePluginBaseUrlURL helpersLink previews and diagnostics that match generated client calls
uploadPluginEndpoint, downloadPluginEndpoint, downloadBlobmultipart / Blob helpersGenerated upload and download endpoint wrappers
usePluginEventStreamauth-aware SSE helperGenerated event-stream endpoint wrappers
usePluginSettingsplugin settings helpersLoad/save plugin configuration
useCurrentExperimentactive experiment helperRead the experiment selected by the platform shell
useExperimentSelectorreactive experiment pickerExperiment dropdowns
useExperimentDatareactive experiment viewLive design + analysis
useExperimentSavesave/load design data and analysis resultsSave back to experiment
useAppExperimentprovide / inject patternPlugin-tree-wide active experiment
defineControls, defineControlModelcompact control schemasGenerate forms/settings/sidebar/workspaces from one model
useControlSchema, useControlWorkspacederived control bindingsLower-level control-driven layouts
defineDoseDesignControlModeldose-design preset modelStandard WellPlate + DoseCalculator workspaces
useBioTemplateWorkspace, useBioTemplatePresetWorkspace, useBioTemplatePackWorkspacebiology template bindingsTemplate-driven design pages
useFileImportdelimited file parser stateCSV/TSV import flows
useListSelection, useSelectionLimitselection stateTables, sample lists, well plates
useTextSearch, useSortedItemsclient-side search/sortFilterable lists and tables
useExpansionSetexpand/collapse stateTrees and grouped panels

Generated plugin client helpers

The generated file frontend/src/generated/mint-plugin.ts wraps the lower-level helpers above with your plugin's contract:

Generated exportPurpose
useGeneratedPluginClient()Typed endpoint calls
useGeneratedPluginContract()Contract metadata, endpoint lookup, URL builders, upload/download adapters
useGeneratedPluginSettings()Typed settings values, save/load, and settingsConfig for top bars
generatedPluginEndpointsLiteral endpoint-name array
generatedPluginEndpointDefinitionsEndpoint method/path/param metadata
buildGeneratedPluginEndpointUrl(name, payload)Concrete URL for an endpoint payload
uploadGeneratedPluginEndpoint(name, payload)Multipart upload through the generated contract
downloadGeneratedPluginEndpoint(name, payload, filename?)Blob download through the generated contract
useGeneratedPluginEventStream(name, payload?, options?)SSE stream with auth headers and reconnect

Generated endpoint calls accept the structured payload shape:

ts
await pluginClient.analyze({
  pathParams: { experimentId: 42 },
  query: { dryRun: true },
  body: { parameters: { threshold: 0.05 } },
})

Flat payload fields are still accepted for compatibility, but the structured form is the recommended style for new code.

Exported types

The package re-exports most public types alongside the values:

ts
import {
  type ApiClientOptions,        // useApi
  type ValidationRule,          // useForm
  type FieldRules,
  type FieldState,
  type UseFormReturn,
  type AsyncError,              // useAsync
  type AsyncState,
  type UseAsyncReturn,
  type ConcentrationValue,      // useConcentrationUnits
  type ConcentrationUnit,
  type MolarityUnit,
  type MassVolumeUnit,
  type PercentageUnit,
  type UnitCategory,
  type DilutionParams,          // useDoseCalculator
  type DilutionResult,
  type SerialDilutionParams,
  type SerialDilutionStep,
  type WellConcentration,
  type ParameterDefinition,     // useProtocolTemplates
  type StepTemplate,
  type ParsedElement,           // useChemicalFormula
  type FormulaParseResult,
  type FormulaPart,
  type FormulaPartType,
  type SequenceType,            // useSequenceUtils
  type SequenceStats,
  type LevelEntry,              // useReagentSeries
  type DilutionPreset,
  type RegistryEntry,           // formBuilderRegistry
  type AppExperimentState,      // useAppExperiment
  type PluginContract,          // generated plugin clients
  type PluginEndpointDefinition,
  type PluginEventStreamOptions,
  type UsePluginSettingsReturn,
  type UseCurrentExperimentReturn,
  type ControlSchema,           // compact controls
  type ControlModel,
  type UseControlWorkspaceReturn,
} from '@morscherlab/mint-sdk'

For the full list, the TypeScript source is the canonical reference: packages/sdk-frontend/src/composables/index.ts.

Notes

  • All components and composables target Vue 3 with the Composition API. They don't work with Options API.
  • Tree-shaking is supported — importing one component pulls only that component into the bundle.
  • Current plugin scaffolds import Tailwind v4 and the SDK style bundle from frontend/src/style.css: @import "tailwindcss"; then @import "@morscherlab/mint-sdk/styles" layer(mint-sdk);. See Frontend → Design tokens.
  • For plugin-scoped API calls, prefer useGeneratedPluginClient() from frontend/src/generated/mint-plugin.ts; use raw useApi() for platform APIs outside the plugin contract.
  • mint doctor flags legacy usePluginApi(), private SDK subpath imports, direct frontend composable file subpaths, and raw plugin API fetch('/api/...') calls.
  • Component Library — one page per component with usage notes and source links
  • Composables — deep dives on generated clients, settings, current experiment, controls, and forms

MINT is open source. Made by the Morscher Lab.