ui library

Accessible Jaspr components styled with JX CSS.

List the components folder in jx.yaml so their classes end up in your stylesheet:

packages: [jx_cli/ui]

Classes

JxAccordion
Sections that expand and collapse, built on <details> and <summary>.
JxAccordionItem
One section of a JxAccordion.
JxAlert
A message banner. danger and warning are announced immediately (role="alert"), the other tones politely (role="status").
JxAvatar
A round picture of a person, or their initials when there is no image.
JxBadge
A short status label.
JxBreadcrumbs
The path to the current page, in a <nav aria-label="Breadcrumb">.
JxButton
A button, or a link styled as a button when href is set.
JxCard
A surface grouping related content, with an optional heading, description and footer (usually actions).
JxCheckbox
A checkbox with its label and an optional description.
JxColumn
A column of a JxDataTable.
JxCombobox
A text field with suggestions, on the native <input list> and <datalist>: the browser filters the list as the user types, and any other value stays accepted.
JxDataTable
A data table: caption, column headers, striped rows, numeric alignment, sortable headers, a sticky header and an empty state.
JxDateField
A labelled date or time input, on the native picker of the browser and the system: keyboard, screen readers and phones handled for you.
JxDivider
A horizontal separator, with an optional centered label ("or").
JxDrawer
A panel that slides in from the side of the screen, built on the native <dialog> like JxModal: focus is kept inside, Escape closes it and the page behind is inert. Open it with a JxModalTrigger whose target is the drawer id.
JxDropdownMenu
A button that reveals a list of links and actions, built on <details> and <summary>.
JxEmptyState
What to show when a list or a search has no result: a title, an explanation and an optional action.
JxKbd
A keyboard key, such as Ctrl or K.
JxMenuItem
An entry of a JxDropdownMenu: a link (href) or an action (onSelect), or a separator.
JxModal
A modal dialog built on the native <dialog> element.
JxModalTrigger
A JxButton that opens the JxModal or JxDrawer whose id is target.
JxPagination
Page links for long lists: previous, numbered pages around the current one, next. Give href for links (works without JavaScript) or onChange for buttons.
JxProgress
A progress bar (role="progressbar").
JxRadioGroup
A group of radio buttons in a <fieldset>, with a visible legend.
JxSegmentedControl
A row of mutually exclusive options drawn as a single control, such as "Day / Week / Month". Native radios in a <fieldset>: arrow keys move between options.
JxSelect
A labelled drop-down list.
JxSkeleton
A pulsing placeholder shown while content loads. Size it with classes, for example h:10 w:10 br:full for an avatar.
JxSlider
A labelled range input with its current value.
JxSpinner
A spinning loading indicator that inherits the text color.
JxStat
A key figure with its label and an optional change, such as "Revenue: $48,200, +12% this month". A <dl>, so the label and the value are read together.
JxStep
One step of a JxSteps.
JxSteps
Where the user is in a flow of several steps (checkout, onboarding).
JxSwitch
An on/off toggle: a checkbox with role="switch", drawn as a track and a thumb. It stays focusable and is toggled with the space key.
JxTab
One tab of a JxTabs: its label and its panel.
JxTabs
Tabs following the ARIA tabs pattern: a tablist of buttons, one tabpanel each.
JxTabsState
JxTextArea
A labelled multi-line text input.
JxTextField
A labelled text input with an optional hint and error message.
JxToast
A short notification, usually shown in a JxToastRegion.
JxToastRegion
Fixed corner of the screen where toasts stack, newest last.
JxTooltip
A short hint shown above child on hover and on keyboard focus.

Enums

JxAvatarSize
Size of a JxAvatar.
JxButtonSize
Size of a JxButton.
JxButtonVariant
Visual style of a JxButton.
JxDateType
Kind of value a JxDateField picks.
JxDrawerSide
Edge of the screen a JxDrawer slides from.
JxMenuAlign
Side of the trigger the menu lines up with.
JxModalSize
Width of a JxModal.
JxSpinnerSize
Size of a JxSpinner.
JxTabsOrientation
Direction of a JxTabs list.
JxToastPosition
Corner of the screen where a JxToastRegion stacks its toasts.
JxTone
Color of a JxBadge or JxAlert.
JxTrend
Direction of the change shown by a JxStat.

Typedefs

JxBreadcrumb = ({String? href, String label})
One step of JxBreadcrumbs; the last one is the current page.
JxOption = ({String label, String value})
One choice of a JxSelect or a JxRadioGroup.