FrontierJS

The component kit

UI · Kit@frontierjs/ui

Sixty-odd components over the design system. A form that already knows what it is editing.

$ npm i @frontierjs/ui

Forms

<Form> takes a resource; every control resolves itself

A control reads its own label, its constraints and its server error from the form context, so a field is one tag with a name on it and the three things that usually drift cannot.

<Form resource={invoices} record={invoice}>
  <Input name="total" />
  <Select name="status" />
</Form>

Replaces

React Hook Form + a resolverFormik + Yup

Attributes

Every component forwards its caller’s attributes

A form control puts them on the CONTROL rather than the wrapper, because that is what a label’s for and an aria-describedby have to reach. A kit that swallows them cannot be made accessible from outside.

Replaces

wrapper components you fork to add an id

Autosave

<Form autosave> saves once the typing stops

The debounce, the in-flight state and the last-write-wins question are the form’s, not yours — one attribute rather than an effect in every screen.

Replaces

a useEffect with a timer per form

Style

A tone and a treatment, never a color

danger and outlined are what a button is; blue is what it happens to look like this theme. A kit component may not style a class the design system owns, so the two cannot fight.

Replaces

colour propsclassName overrides

Destructive

A destructive action confirms itself

The confirmation is part of the component rather than a modal you remember to wire, so the dangerous path is the one with a guard on it by default.

Replaces

a confirm modal copied per screen

Contributing

A control of your own is two registrations

A custom control joins the form contract the same way the built-in ones did, so it gets labels, errors and constraints without special-casing.

Replaces

a control that only works outside the form

Forms

FormButtonFieldFieldsetLabelInputTextareaSelectCheckboxSwitchRadioGroupNumberInputSliderComboboxMultiSelectDatePickerDateTimeInputJsonInputFileUpload

Display

BadgePillTagDotKbdMonoDividerBreadcrumbsPaginationStepsSectionHeaderCalloutEmptyStateCopyButtonCodeAvatarAvatarGroupStatStatCardTableBarSparklineAccountStatusJson

Layout

CardAccordionAccordionItemTabsTabListTabTabPanel

Overlay

ModalDrawerPopoverTooltipDropdownMenuDropdownItemDropdownGroupDropdownSeparatorCommandPaletteConfirmationPopoverConfirmPanelConfirmProvider

Feedback & stores

AlertAlertProviderToastToasterProgressSpinnerSkeletontoastStorealertStorecommandPaletteStore