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
Color-
RgbColor-
FontVariant-
LockStyle-
ProgressBarColor-
AvatarType-
ModalType-
StatCardVariant-
TestId-

Interfaces​

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

Type Aliases​

Type AliasDescription
Breakpoint-
BadgeCounterProps-
ButtonTextProps-
ButtonProps-
AlignWithFloatRootTrigger-
InteractiveElementHTMLTag-
InteractiveElementProps-
PanelProps-
IScrollbars-
SimpleButtonProps-
TextProps-
TextLinkProps-
NotificationTooltipPosition-
NotificationTooltipProps-
OverlayOpacity-
FullSizeWindowColorBackgroundProps-
FullSizeWindowImageBackgroundProps-
StatusItem-
ActivityCardAction-
AriaMenuProps-
AriaSubMenuContentHelpersHelpers passed to a submenu's content render function, allowing the content to close the whole menu or navigate back to the previous level.
AriaSubMenuA submenu that opens in place inside an AriaMenu when its parent item is clicked. A submenu can either render a nested list of AriaMenuItem (which can themselves open further submenus) or arbitrary React content. When a submenu is open, a back button is rendered at the top of the menu to return to the previous level.
AriaMenuItemThe structure of a menu item that can be used to create a dropdown menu.
BreadcrumbItem-
DropContentPosition-
DropContentType-
GroupProps-
MenuItem-
MenuAction-
MenuContent-
ModalProps-
MultiselectCoreProps-
MultistepIndicatorProps-
NotificationToastMessage-
NotificationToastSignal-
SelectProps-
TableResultsCountProps-
TagItem-
ToastPosition-
Theme-
Option-
MultiselectOption-
ButtonHTMLTag-
InlineElement-
HeadingElement-
ClickEventHandler-
ImageSrc-
BackgroundImageSrc-
LinkTarget-
ExtendedTooltipPosition-
TooltipPosition-
AllSize-
BaseSizeModifier-
SizeModifier-
LogoSizeModifier-
StandardSizeModifier-
ExtendedSizeModifier-
ModalSizeModifier-
VideoWrapperSizeModifier-
ButtonModifiersValues-
ColorScheme-
ButtonVariant-
InputVariant-
LabelModifier-
ShadowModifier-
HeadingFontVariant-
StatIndicatorVariant-
TextVariant-
VideoWrapperVariant-
FullSizeWindowBackgroundVariant-
BadgeCounterVariant-

Variables​

VariableDescription
IconTypes-
breakpoints-
variables-
ActionsRow-
AnnouncerAnnouncer component that announces messages to screen readers via aria-live region. This component should be placed at the top of the application.
Audio-
BadgeCounter-
Box-
BoxHeader-
LoadingBox-
Enhancers-
ButtonText-
Button-
RefButton-
CallToAction-
Checkbox-
CoreHeader-
Divider-
DragAndDrop-
DraggableA wrapper that makes its children draggable via pointer (and, when isMoveableWithArrowKeys is set, the keyboard).
FileUpload-
Heading-
Icon-
Input-
InputLabel-
InteractiveElement-
RefInteractiveElement-
LineHeading-
ListBoxLink-
ListLink-
Logo-
Panel-
PexipLogo-
Pill-
ProgressBar-
RadioButton-
RangeSlider-
Scrollbars-
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.
RefSimpleButton-
Spinner-
StatIndicator-
StepNumber-
SvgImage-
Text-
TextArea-
TextHeading-
TextLink-
ToggleSwitch-
ToggleSwitchDisplayPresentational version of ToggleSwitch that renders only the visual toggle indicator and label text — it does not render an <input> or manage any interaction/state itself.
CustomTooltip-
NotificationTooltip-
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.
URLToLink-
Video-
CardLayout-
CenterLayout-
FullSizeWindow-
FullscreenLayout-
FullscreenOverlay-
FullscreenSpinner-
Cell-
Grid-
Scrim-
Wrapper-
AboutText-
AboutModal-
Accordion-
ActivityCard-
ariaMenuOpenStateSignal-
AriaMenuAriaMenu component represents a dropdown menu. Menu items can open submenus in place, rendering either a nested list of items or arbitrary React content, with a back button to return to the previous level.
AspectRatioA wrapper that makes its children element bound to an aspect ratio. Default ration is 16:9, {width: 16, height: 9}
ColorPickerPreviewButton-
ImagePreviewButton-
ColorPreviewButton-
Avatar-
Bar-
Breadcrumbs-
CakeTimer-
Captions-
CircleCountDown-
ModalCloseButtonA generic close button for modals, tooltips and pill toasts.
CollapsableContainer-
CondensedTabs-
ConfirmationModal-
ContextMenuContextMenu will the show the "menu" component as a context menu when the user right clicks on the given child element.
Details-
DragAndUploadFiles-
DropContent-
Form-
Group-
InfoMessage-
KebabMenuButton-
List-
Row-
PlainMenuEntry-
MenuEntry-
Menu-
Modal-
ModalCloseButtonWithTooltip-
HotkeysTooltip-
HotKey-
ConfirmableMultiselect-
Multiselect-
MultiselectCore-
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-
NumberStepInput-
PasswordInputThe PasswordInput is a normal Input element that can toggle between password and text type with a show/hide button.
PopOutWindow-
PreferenceInput-
PreferenceWrapper-
PreferenceMultiselect-
PreferenceRow-
SearchInput-
Section-
SectionAccordion-
Select-
Sheet-
StatCardBox-
StatCardRow-
StatCard-
ExpanderCell-
InfoHeadCell-
SortingIndicator-
Table-
TableBody-
TableCell-
TableContent-
TableHead-
TableHeadCell-
TablePagination-
TableRowWrapper-
TableRow-
TableSection-
Tabs-
Tab-
Tag-
TagList-
ThreeColumnSelector-
Toast-
User-
UserMenuButton-
UserMenuDropContent-
VideoWrapper-
KEYBOARD_EVENT_KEY-
themeValues-
ThemeContext-
ThemeConsumer-
ThemeProvider-
TooltipPositionValue-
buttonVariantsValues-

Functions​

FunctionDescription
announceAnnounce a message to screen readers. Announcer needs to be mounted in the application for this to work.
useInput-
useMultistepIndicatorConvenience hook for using steps in MultistepIndicator
useGroupedPagesNav-
useTabs-
withTabName-
withTransition-
useBelow360-
useLandscape-
useLg-
useLgDown-
useLgUp-
useMd-
useMdDown-
useMdToXl-
useMdUp-
useMobileDevice-
useMobileDeviceLandscape-
useMobileDevicePortrait-
usePortrait-
useSm-
useSmDown-
useSmToLg-
useSmToXl-
useSmUp-
useTabletDevice-
useTouchDevice-
useXl-
useXlDown-
useXlUp-
useXs-
useBoundingRectObserves a HTMLElement and returns its bounding rect. Updates when the element's size changes.
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.
useModal-
useModalHandle-
useModalWithoutPreventScrollAlternative to useModal that does not use useModalOverlay.
useOutOfViewNavigation-
useScrollIntoView-
withColorScheme-
sizeToPadding-
isImageSrcString-
isImageSrcEmpty-
isBackgroundImageSrcEmpty-
onEnter-
isValidIconName-