UI component inventory
Design system components for advanced customization of all SDK UI. See the component adapter guide for more context.
ComponentsContextType
Full map of UI components used by the SDK. Every property is a React component that the SDK renders internally — override any of them to substitute your own design system.
Pass a Partial<ComponentsContextType> to GustoProvider via the components prop to
replace specific components while keeping SDK defaults for the rest.
To take full control of every UI component (and eliminate the React Aria dependency),
pass a complete ComponentsContextType to GustoProviderCustomUIAdapter instead.
All properties are then required except PaginationControl and PayrollLoading,
which fall back to built-in SDK implementations when omitted.
Examples
Partial override with GustoProvider
import { GustoProvider } from '@gusto/embedded-react-sdk'
function App() {
return (
<GustoProvider
config={{ baseUrl: '/api/gusto/' }}
components={{
Button: MyButton,
TextInput: MyTextInput,
}}
>
<EmployeeOnboardingFlow companyId="company_123" />
</GustoProvider>
)
}
Full replacement with GustoProviderCustomUIAdapter
import { GustoProviderCustomUIAdapter, type ComponentsContextType } from '@gusto/embedded-react-sdk'
const myComponents: ComponentsContextType = {
Alert: props => <MyAlert {...props} />,
Button: props => <MyButton {...props} />,
// ... all required components
}
function App() {
return (
<GustoProviderCustomUIAdapter
config={{ baseUrl: '/api/gusto/' }}
components={myComponents}
>
<EmployeeOnboardingFlow companyId="company_123" />
</GustoProviderCustomUIAdapter>
)
}
Properties
| Property | Type | Description |
|---|---|---|
Alert | FunctionComponent<AlertProps> | Status message with an optional dismiss action; used for errors, warnings, success, and info. |
Badge | FunctionComponent<BadgeProps> | Small inline label for status, counts, or tags; optionally dismissible. |
Banner | FunctionComponent<BannerProps> | Full-width notification banner for prominent warnings and errors. |
Box | FunctionComponent<BoxProps> | Sectioned layout container with distinct header, body, and footer areas. |
BoxHeader | FunctionComponent<BoxHeaderProps> | Header section of a Box with a title, optional description, and optional inline action. |
Breadcrumbs | FunctionComponent<BreadcrumbsProps> | Navigation breadcrumb trail showing the user's position in a multi-step flow. |
Button | FunctionComponent<ButtonProps> | HTML <button> with primary, secondary, tertiary, and error variants. |
ButtonIcon | FunctionComponent<ButtonIconProps> | Icon-only <button>; requires aria-label since there is no visible text for assistive technologies. |
CalendarPreview | FunctionComponent<CalendarPreviewProps> | Read-only calendar for visualizing a date range with optional highlighted dates. |
Card | FunctionComponent<CardProps> | Content container with an optional overflow menu and a leading action slot. |
Checkbox | FunctionComponent<CheckboxProps> | Form field wrapping a single <input type="checkbox" />. |
CheckboxGroup | FunctionComponent<CheckboxGroupProps> | Form field grouping <input type="checkbox" /> elements for multi-option selection. |
ComboBox | FunctionComponent<ComboBoxProps> | Form field wrapping a typeahead <input /> for single-option selection. |
DatePicker | FunctionComponent<DatePickerProps> | Form field wrapping an <input type="date" /> with a calendar picker popover. |
DateRangePicker | FunctionComponent<DateRangePickerProps> | Form field wrapping paired <input type="date" /> elements for a date range. |
DescriptionList | FunctionComponent<DescriptionListProps> | HTML <dl> of term/description pairs in stacked or horizontal layout. |
Dialog | FunctionComponent<DialogProps> | Modal confirmation dialog with a primary action and a cancel action. |
FileInput | FunctionComponent<FileInputProps> | Form field wrapping an <input type="file" />. |
FormBox | FunctionComponent<FormBoxProps> | Bordered container for grouping related form fields, with an optional header slot. |
FormBoxHeader | FunctionComponent<FormBoxHeaderProps> | Header section of a FormBox with a title, optional description, and optional inline action. |
Heading | FunctionComponent<HeadingProps> | HTML <h1>–<h6> with visual style controlled independently from semantic level. |
Link | FunctionComponent<LinkProps> | HTML <a> for inline navigation. |
LoadingSpinner | FunctionComponent<LoadingSpinnerProps> | Spinner shown while data or an action is pending. |
Menu | FunctionComponent<MenuProps> | Popover menu of actions anchored to a trigger element. |
Modal | FunctionComponent<ModalProps> | Overlay modal with customizable body content and footer. |
MultiSelectComboBox | FunctionComponent<MultiSelectComboBoxProps> | Form field wrapping a typeahead <input /> for multi-option selection. |
NumberInput | FunctionComponent<NumberInputProps> | Form field wrapping a numeric <input /> for currency, decimal, or percent values. |
OrderedList | FunctionComponent<OrderedListProps> | HTML <ol> for a numbered list of items. |
ProgressBar | FunctionComponent<ProgressBarProps> | Step-based progress indicator for multi-step flows. |
Radio | FunctionComponent<RadioProps> | Form field wrapping a single <input type="radio" />. |
RadioGroup | FunctionComponent<RadioGroupProps> | Form field grouping <input type="radio" /> elements for single-option selection. |
Select | FunctionComponent<SelectProps> | Form field wrapping a single-select dropdown. |
Switch | FunctionComponent<SwitchProps> | Form field wrapping an <input type="checkbox" /> styled as a toggle. |
Table | FunctionComponent<TableProps> | Tabular data display with headers, rows, optional footer, and empty state. |
Tabs | FunctionComponent<TabsProps> | Tabbed navigation with associated content panels. |
Text | FunctionComponent<TextProps> | Body text element rendered as <p>, <span>, <div>, or <pre>. |
TextArea | FunctionComponent<TextAreaProps> | Form field wrapping a <textarea>. |
TextInput | FunctionComponent<TextInputProps> | Form field wrapping an <input />. |
UnorderedList | FunctionComponent<UnorderedListProps> | HTML <ul> for an unordered list of items. |
PaginationControl? | FunctionComponent<PaginationControlProps> | Pagination controls for list views. Defaults to the SDK's built-in pagination UI when omitted. |
PayrollLoading? | FunctionComponent<PayrollLoadingProps> | Loading indicator for payroll calculation. Defaults to the SDK's built-in loading state when omitted. |