This chapter is short: it gives you an idea of all the controls and tools that exist in x4js, and what they are for.
The exact properties and methods of each one are in the API reference .
To see them at work, the gallery has one page per component, with its description and the code of the example.
Control
Description
Box, HBox, VBox
Generic, horizontal and vertical container.
HSplitBox, VSplitBox
Panels side by side or stacked, resizable by the user.
HSizer, VSizer
Resize handles placed by hand, when an HSplitBox or a VSplitBox does not fit.
DockingView
Panels the user arranges by dragging their title, as in an IDE.
StackBox
Stack of pages, only one of which is visible.
AssistBox
Stack of pages walked through in order, for a wizard.
Carousel
Slides that move: arrows, dots, swipe, autoplay.
GridBox
Grid of rows and columns.
MasonryBox
Masonry layout.
Tabs
Pages reached through tabs.
Panel
Container with a title.
Form
Form: reads and writes the values of the fields that have a name. See Forms and dialogs .
SettingsView, SettingItem
Settings page, like the one of VS Code: summary, sections, search.
ScrollView
Scrolling area.
Flex, Space
Empty elements: one takes the remaining space, the other has a fixed size.
Control
Description
Label
Text, with an optional icon.
SimpleText
Text only.
Icon
Icon (SVG, CSS variable or image).
Image
Image, which can also accept a dropped file.
Link
Link.
Tag
Short tag, with an optional icon.
Progress
Progress bar.
Gauge
Needle gauge.
Bargraph
Level meter made of segments, like a VU meter.
Rating
Rating (stars…).
Timeline
Events on a line, each one with its icon and its date.
TickLine
Mini chart of a series of values, as bars or as a line.
Chart
Simple chart: lines, areas, bars, pie, donut, radar.
Canvas
Free drawing area.
SvgComponent
SVG component, the base of drawn controls.
Video
Video player.
Breadcrumbs
Breadcrumb trail.
Control
Description
Button
Button, with text and/or icon, and an optional menu.
BtnGroup
Group of buttons, with predefined ones (ok, cancel…).
Input
Native input field: text, number, date, time, file…
TextEdit
Input field with its label.
TextArea, SimpleTextArea
Multi-line input, with or without a label.
Checkbox, Radio, Switch
Check box, radio button, switch.
Slider
Slider.
Knob
Rotary knob, on a range or endless.
Select
Native choice list.
Combobox
Drop-down list over a known list.
AutoComplete
Field with suggestions fetched on demand.
ColorInput, ColorPicker
Color input and color choice.
Calendar, PopupCalendar
Calendar, in the page or as a popup.
FileDrop, FileDialog
File drop zone, file picker of the system.
Keyboard
Virtual keyboard.
Control
Description
Listbox
Simple list, with optional columns.
Header
Header of resizable columns, for a Listbox.
Treeview
Tree list.
Gridview
Tabular display of a DataStore.
Spreadsheet
Spreadsheet-like table, editable in place.
PropertyGrid
Property editor.
Control
Description
Popup
Base of everything displayed above the page.
Dialog
Base of dialog boxes.
MessageBox, InputBox, PromptBox
Message, input of a value, input with the editor of your choice.
ProgressionBox
Follow-up of a long operation, with texts and errors.
Menu
Context or drop-down menu.
Notification
Notification to the user.
Tooltips are obtained with the tooltip property, common to all components, after a call to initTooltips( ) at startup.
These components are big, or seldom used: they are not in x4js, but each one has an import of its own. An application that does not use them carries neither their code nor their CSS.
Control
Import
Description
Gantt
x4js/gantt
Tasks on a calendar: bars, dependencies, groups, milestones.
Planner
x4js/planner
Planner: events by day, by week or by month.
MapView
x4js/mapview
Tile map (OpenStreetMap by default), with markers and zones.
MonacoEditor
x4js/monaco
Code editor. Its files must be copied to the monaco folder of the output.
import { Gantt } from " x4js/gantt " ;
Tool
Description
Application
Singleton that defines the application.
makeState
Observable state of the application.
DataModel, DataStore, DataView
Records, storage, and filtered or sorted views.
Store
Cell storage, for Spreadsheet.
Router
Routing by address.
_tr, addTranslation…
Translation system.
formatNumber, formatMoney, formatDate…
Numbers, amounts, percentages and dates in the format of the current language.
addShortcut( ), shortcutText
Keyboard shortcuts, of a component or of the whole application.
setClipboard, getClipboard
System clipboard: text, image, files.
Color, Rect, Point, Size
Colors and geometry.
dragManager
Drag and drop.
setStyleVariable( ), getComputedStyle( )
Change a CSS variable of a component, read its computed style.
SvgBuilder
Building SVG drawings.
X4PDFBuilder, renderBarcodeImage
PDF generation, barcodes (Data Matrix, Code 128).
x4_react
JSX factory, to write a tree of components in a .tsx file.
On top of this come many convenient functions to handle dates, strings or the DOM. Have a look at core_tools in the sources to get an idea.