Skip to main content

UI component reference

Reference pages for the components in @enmovil/ui-design-system version 0.1.6. Each page is generated from the component source and its Storybook stories, so the properties and examples match that release.

ComponentCategoryDescription
DatePickerDate&TimeLets the user pick a single date, with optional time and week display and a list of quick selections. onDateChange reports the selected date as a string in format.
DateRangePickerDate&TimeLets the user pick a start and end date, with optional time and week display and a list of quick ranges such as "Last Month".
TimePickerDate&TimeLets the user pick a time of day. defaultTime sets the initial time in HH:mm:ss format, and onChange reports the selected time.
AccordionGeneralA set of collapsible panels built from an items list. Each panel header expands or collapses its content, and onChange reports the keys of the open panels.
BadgeGeneralShows a count or a dot badge over its children, such as an avatar or an icon. Use count for a number or showDot for a simple indicator.
BreadcrumbsGeneralShows a breadcrumb trail built from path, with an optional home icon and an area for actions on the right. Every crumb except the current one is a link, and onItemClick and onHomeClick fire before navigation so you can cancel it.
ButtonGeneralA clickable button with Enmovil colour variants, visual types, sizes, a loading state and an optional icon.
ButtonGroupGeneralA row of buttons where one option is selected at a time, built from an options list. onChange fires when the user picks an option, and the group can be spaced out or rounded.
CalendarGeneralA full calendar view for browsing and selecting dates by month or year. It can show week numbers and custom content in date cells, and can be displayed inline instead of full size.
CaptchaGeneralA text captcha with a randomly generated code, an input for the answer and a reload button. It checks the answer when the input loses focus and reports the result through isValid.
CardGeneralA content container with optional header, title and body sections (Card.Header, Card.Title and Card.Body). It comes in several colour tones and a compact spacing option.
CascaderGeneralA select for choosing a value from a hierarchy, such as region, state and city, by drilling down level by level. It supports search, selecting several values, and choosing a parent level as the value.
ChartGeneralA chart whose colours come from the design system. Pass a chart type and chart options; it also handles the height, custom series colours, a loading skeleton and an empty state.
CounterGeneralShows a row of KPI counters that count up to their value, with optional breakdowns, abbreviation (K/L/Cr or K/M/B), selection and drag-to-reorder.
DividerGeneralA line that separates content, horizontally or vertically. A horizontal divider can carry a title, positioned with orientation.
DrawerGeneralA panel that slides in from an edge of the screen. Open and close it with isOpen and onClose, and set the edge with placement.
EmptyGeneralA placeholder for when there is no data to show, with a simple image and an optional description.
FileUploadGeneralLets the user upload files, either by dragging them onto a drop area or with an upload button (variant). The drop area's text and icon can be customised, and onChange fires each time the upload changes.
FilterBarGeneralA horizontal row that holds filter controls, with a right-aligned area for actions such as Reset and Apply. Wrap each labelled control in FilterItem.
FooterGeneralAn application footer showing the copyright line with the current year and an optional version number. It can be static, sticky or fixed, with its text aligned left, centre or right.
GanttGeneralA Gantt chart of rows, such as zones or sub-locations, with status-coloured bars for tasks. It has a today line, hover tooltips, an optional progress overlay and a day, week or month zoom.
GridGeneralA data grid for large or complex tables, with sorting, filtering, pagination and row selection. It can show a label and buttons that export the data to CSV or Excel.
HeaderGeneralThe application's top bar, with app and customer logos, a side-navigation toggle, a user menu and a theme toggle. It can also show page search and a notifications dropdown.
IconGeneralRenders an icon by name, with an optional colour, size, spin and rotation. An unknown name logs a warning and renders nothing.
KpiTileGeneralA tile that shows one KPI: a label, a value, optional sub-text and an up, down or flat trend. Tiles come in several colour tones, become clickable when given onClick, and can be laid out with KpiGrid.
LoadingContainerGeneralProvides an app-wide loading indicator. Wrap your app in LoadingContainer, then call useLoader().showLoader() and hideLoader() from any component inside it.
LoginCardGeneralA complete sign-in screen covering login, OTP entry, forgotten and reset passwords, and setting a new password, selected with authStep. It can also show a captcha and a single sign-on button, and its layout and branding are configurable.
MapGeneralA map that shows groups of markers, routes and geofences, with optional drawing tools and place search. It needs a Google Maps API key, passed in apiKey.
MessageButtonGeneralA button labelled "Show Message" that displays a fixed "Success!" message when clicked. Its style is set with variant.
ModalGeneralA centred dialog with a title, your content and a footer of action buttons that you supply in actionButtons. Show it with open and handle closing in onCancel.
NotificationGeneralShows notifications in a corner of the screen in info, success, warning or error styles. Call showNotification() from anywhere to display one; the Notification component itself renders a button that triggers it.
PageHeaderGeneralThe title row at the top of a page, with an optional subtitle, a back link and action buttons. The title can include inline content such as badges or icons.
PopoverGeneralA button that opens a small popover with a title and placeholder content when it is hovered, focused or clicked (trigger). The popover content is fixed, so the component is mainly a demonstration.
PreviewGeneralAn image gallery that opens images in a full-screen preview with a toolbar. Images come from imageList, and the toolbar can include a download button.
ProgressGeneralShows progress as a bar or a circle, with a percentage, a status such as active or exception, and an optional custom colour.
RatingGeneralA star rating input. It can allow half stars and clearing the rating, and reports changes through onChange.
SegmentedGeneralA segmented control for switching between a small set of options or views. Without options, it shows Daily, Weekly, Monthly, Quarterly and Yearly.
SelectGeneralA dropdown for choosing one or several options, with search, a clear button and a loading state. In multiple mode, selected values that don't fit collapse into a single tag that lists them in a tooltip, and children renders as a label above the field.
SidebarGeneralA collapsible side navigation menu built from menus. It uses a dark theme by default; pass theme="light" for a white background with teal accents.
SkeletonGeneralPlaceholder shapes shown while content loads. variant chooses a full layout (avatar, title and paragraph rows) or a single element such as an avatar, button, input or image.
SliderGeneralLets the user pick a single value or a range (mode) by dragging a handle along a track. It supports steps, marks, a vertical layout and a reversed direction.
SpinGeneralA small loading spinner. It takes no properties.
StatusBadgeGeneralA coloured status pill. Its tone is picked automatically from common status strings, and you can override the tone, add a leading dot or change the label.
StepperGeneralShows progress through a series of steps, horizontally or vertically. Set the current step with selected; with isClickable, users can click a step and onChange reports its index. Also exported as StepsVertical.
SwitchGeneralAn on/off toggle with Enmovil colour variants. It can show labels inside the switch for the on and off states.
TableGeneralA table for small datasets, with a scrollable body and fixed columns. Its row type is currently fixed to key, name, age and address, so use Grid for real data.
TabsGeneralTab navigation built from an items list, where each tab can show a count badge next to its label. Set the tab that opens first with defaultActiveKey.
TagsGeneralA small tag that shows a label with an optional status icon, such as a check, clock or close icon, chosen with iconType.
TimelineGeneralA vertical timeline of events built from items. Events can alternate sides, use custom colours and contain rich content.
ToastContainerGeneralShows short toast messages in info, success, error or warning styles. Render ToastContainer once, then call showToast() from anywhere with a message, type and duration.
TooltipGeneralShows a short text tip when the user hovers over its children. Set where it appears with placement, and hide the arrow with isArrow.
CheckboxInputA group of checkboxes built from an items list, laid out horizontally or vertically. Each item's checked value sets whether it is ticked, and onChange reports the keys of the ticked items.
InputInputA single-line text input with Enmovil sizing (middle by default) and validation states through status. It supports content before and after the field, a suffix and a clear button.
OtpInputInputA row of boxes for entering a one-time password, one character per box. Set the number of boxes with length; onChange fires once every box is filled.
RadioInputA group of radio buttons built from an items list, laid out horizontally or vertically. defaultValue sets the initially selected item, and onChange fires when the selection changes.
TextAreaInputA multi-line text input. Its height can be fixed with rows or follow the content with autoSize, and it can show a character count and a clear button.