Skip to main content

@pexip/components

Shared UI component library based on Pexip's design system.

Install

npm install @pexip/components

Usage

In your project, simply do the following:

import {FullSizeWindow, Sidebar} from '@pexip/components';

() => <FullSizeWindow>My stuff</FullSizeWindow>;

There are some global styles as well, with fonts, tokens, etc.

// Import fonts
import '@pexip/components/src/fonts.css';
// Import other global styles
import '@pexip/components/dist/index.css';

Enumerations

EnumerationDescription
AvatarType-
Color-
FontVariant-
LockStyle-
ModalType-
ProgressBarColor-
RgbColor-
StatCardVariant-
TestId-

Interfaces

InterfaceDescription
EnhancerProps-
FloatRootOverflow-
FullSizeWindowCommonProps-
IconCollection-
IconSource-
LoadingBoxProps-
ModalHandle-
MultistepItem-
StatCardRowData-
ToastProps-
VideoHandle-
WithTransitionProps-

Type Aliases

Type AliasDescription
ActivityCardAction-
AlignWithFloatRootTrigger-
AllSize-
AriaMenuItemThe structure of a menu item that can be used to create a dropdown menu.
AriaMenuProps-
BackgroundImageSrc-
BadgeCounterProps-
BadgeCounterVariant-
BaseSizeModifier-
BreadcrumbItem-
Breakpoint-
ButtonHTMLTag-
ButtonModifiersValues-
ButtonProps-
ButtonTextProps-
ButtonVariant-
ClickEventHandler-
ColorScheme-
DropContentPosition-
DropContentType-
ExtendedSizeModifier-
ExtendedTooltipPosition-
FullSizeWindowBackgroundVariant-
FullSizeWindowColorBackgroundProps-
FullSizeWindowImageBackgroundProps-
GroupProps-
HeadingElement-
HeadingFontVariant-
ImageSrc-
InlineElement-
InputVariant-
InteractiveElementHTMLTag-
InteractiveElementProps-
IScrollbars-
LabelModifier-
LinkTarget-
LogoSizeModifier-
MenuAction-
MenuContent-
MenuItem-
ModalProps-
ModalSizeModifier-
MultiselectOption-
MultistepIndicatorProps-
NotificationToastMessage-
NotificationToastSignal-
NotificationTooltipPosition-
Option-
OverlayOpacity-
PanelProps-
SelectProps-
ShadowModifier-
SimpleButtonProps-
SizeModifier-
StandardSizeModifier-
StatIndicatorVariant-
StatusItem-
TableResultsCountProps-
TagItem-
TextLinkProps-
TextProps-
TextVariant-
Theme-
ToastPosition-
TooltipPosition-
VideoWrapperSizeModifier-
VideoWrapperVariant-

Variables

VariableDescription
AboutModal-
AboutText-
Accordion-
ActionsRow-
ActivityCard-
AnnouncerAnnouncer component that announces messages to screen readers via aria-live region. This component should be placed at the top of the application.
AriaMenuAriaMenu component represents a dropdown menu.
ariaMenuOpenStateSignal-
AspectRatioA wrapper that makes its children element bound to an aspect ratio. Default ration is 16:9, {width: 16, height: 9}
Audio-
Avatar-
BadgeCounter-
Bar-
Box-
BoxHeader-
Breadcrumbs-
breakpoints-
Button-
ButtonText-
CakeTimer-
CallToAction-
Captions-
CardLayout-
Cell-
CenterLayout-
Checkbox-
CircleCountDown-
CollapsableContainer-
ColorPickerPreviewButton-
ColorPreviewButton-
CondensedTabs-
ConfirmableMultiselect-
ConfirmationModal-
ContextMenuContextMenu will the show the "menu" component as a context menu when the user right clicks on the given child element.
CoreHeader-
CustomTooltip-
Divider-
DragAndDrop-
DragAndUploadFiles-
Draggable-
DropContent-
Enhancers-
ExpanderCell-
FileUpload-
Form-
FullscreenLayout-
FullscreenOverlay-
FullscreenSpinner-
FullSizeWindow-
Grid-
Group-
Heading-
HotKey-
HotkeysTooltip-
Icon-
IconTypes-
ImagePreviewButton-
InfoHeadCell-
InfoMessage-
Input-
InputLabel-
InteractiveElement-
KebabMenuButton-
LineHeading-
List-
ListBoxLink-
ListLink-
LoadingBox-
Logo-
Menu-
MenuEntry-
Modal-
ModalCloseButtonA generic close button for modals, tooltips and pill toasts.
ModalCloseButtonWithTooltip-
Multiselect-
MultistepIndicator-
NotificationToastThe NotificationToast component works like a normal toast, except it displays data received via a signal, and it stores the messages as an array, displaying one at a time.
notificationToastSignal-
NotificationTooltip-
NumberStepInput-
Panel-
PasswordInputThe PasswordInput is a normal Input element that can toggle between password and text type with a show/hide button.
PexipLogo-
Pill-
PopOutWindow-
PreferenceInput-
PreferenceMultiselect-
PreferenceRow-
PreferenceWrapper-
ProgressBar-
RadioButton-
RangeSlider-
RefButton-
RefInteractiveElement-
RefSimpleButton-
Row-
Scrim-
Scrollbars-
SearchInput-
Section-
SectionAccordion-
Select-
Sheet-
SimpleButtonSimpleButton looks and acts mostly the same as a normal Button except it has less features. The idea is to make it easy to do use composition (children components) to add desired behaviour.
SortingIndicator-
Spinner-
StatCard-
StatCardBox-
StatCardRow-
StatIndicator-
StepNumber-
SvgImage-
Tab-
Table-
TableBody-
TableCell-
TableContent-
TableHead-
TableHeadCell-
TablePagination-
TableRow-
TableRowWrapper-
TableSection-
Tabs-
Tag-
TagList-
Text-
TextArea-
TextHeading-
TextLink-
ThemeConsumer-
ThemeContext-
ThemeProvider-
themeValues-
ThreeColumnSelector-
Toast-
ToggleSwitch-
TooltipTooltips need to be accessible to keyboard and screen reader users, so we ensure that they are only placed on focusable and hoverable elements. For example, plain text and disabled buttons aren't focusable, meaning keyboard and screen reader users would be unable to access the information in that tooltip.
TooltipPositionValue-
URLToLink-
User-
UserMenuButton-
UserMenuDropContent-
variables-
Video-
VideoWrapper-
Wrapper-

Functions

FunctionDescription
announceAnnounce a message to screen readers. Announcer needs to be mounted in the application for this to work.
isBackgroundImageSrcEmpty-
isImageSrcEmpty-
isImageSrcString-
isValidIconName-
onEnter-
sizeToPadding-
useBelow360-
useBreakpointChange-
useFocusFromThis hook gives the ability to set the focus on an element which is then blurred right away, thereby effectively resetting the focus order. The next focusable element that comes after this element will be focused on the next tab.
useFocusFromOpenedUse this hook to set the focus point on an element when something becomes opened, e.g. set focus on a panel container or menu container when it becomes visible so that the next time the user hits on the tab key the element that becomes focused on is potentially a tabbable element inside the container element.
useGroupedPagesNav-
useInput-
useLandscape-
useLg-
useLgDown-
useLgUp-
useMd-
useMdDown-
useMdToXl-
useMdUp-
useMobileDevice-
useMobileDeviceLandscape-
useMobileDevicePortrait-
useModal-
useModalHandle-
useMultistepIndicatorConvenience hook for using steps in MultistepIndicator
usePortrait-
useScrollIntoView-
useSm-
useSmDown-
useSmToLg-
useSmToXl-
useSmUp-
useTabletDevice-
useTabs-
useTouchDevice-
useXl-
useXlDown-
useXlUp-
useXs-
withColorScheme-
withTabName-
withTransition-