Skip to main content

jx_ui 0.0.2 copy "jx_ui: ^0.0.2" to clipboard
jx_ui: ^0.0.2 copied to clipboard

discontinuedreplaced by: jx_cli
retracted[pending analysis]

Accessible Jaspr components styled with JX CSS: buttons, cards, badges, alerts and text fields. No Node.js, no JavaScript.

jx_ui #

Accessible Jaspr components styled with JX CSS (ZASPR Kit), the utility-first CSS framework written in Dart. No Node.js, no JavaScript runtime, no CSS file to ship: the styles are regular JX classes compiled into your own stylesheet.

Group Components
Actions JxButton (5 variants, 3 sizes, loading, fullWidth, link with href)
Layout JxCard (title, description, footer), JxDivider, JxBreadcrumbs
Forms JxTextField, JxTextArea, JxSelect, JxCheckbox, JxSwitch, JxRadioGroup
Feedback JxAlert, JxBadge, JxSpinner, JxProgress, JxSkeleton, JxEmptyState
Display JxAvatar, JxTooltip, JxKbd
Overlays JxModal, JxModalTrigger (native <dialog>, no JavaScript)
Data JxDataTable (sortable, sticky header, numeric columns), JxPagination

Form controls link their label, hint and error (for, aria-describedby, aria-invalid). The switch, tooltip and skeleton need no JavaScript: they are drawn with peer-* and group-* classes. Animations stop when the system asks for reduced motion.

Every component has a visible keyboard focus and dark: styles.

Installation #

dart pub add jx_ui:^0.0.2
dart pub add dev:jx_cli:^0.0.1     # or dev:jx_builder

List the package in jx.yaml so its classes end up in your stylesheet:

# jx.yaml
packages: [jx_ui]

Usage #

import 'package:jx_ui/jx_ui.dart';

JxCard(title: 'Newsletter', [
  const JxTextField(
    id: 'email',
    label: 'Email',
    type: InputType.email,
    hint: 'One email per month.',
  ),
  JxButton([.text('Subscribe')], onClick: subscribe),
  const JxBadge('New', tone: JxTone.info),
])

Each component takes a classes argument, appended after its own classes, to adjust spacing or width: JxButton(..., classes: 'w:full').

Colors come from the default theme (blue, gray, red, green, yellow). Redefine those families in theme.extend.colors to restyle every component at once.

The JX CSS family #

Package Role
jx_cli Command line: jx init, jx build, jx migrate.
jx_builder build_runner integration: CSS generated by jaspr serve and jaspr build.
jx_ui Ready-made Jaspr components styled with JX.
jx_engine Compilation engine and Tailwind converter, usable as a library.

Documentation: https://nathanaelzie.github.io/zaspr-kit/

License #

MIT.

0
likes
0
points
92
downloads

Publisher

unverified uploader

Weekly Downloads

Accessible Jaspr components styled with JX CSS: buttons, cards, badges, alerts and text fields. No Node.js, no JavaScript.

Repository (GitHub)
View/report issues

Topics

#css #jaspr #ui #components

License

(pending) (license)

Dependencies

jaspr

More

Packages that depend on jx_ui