Skip to main content

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

discontinuedreplaced by: jx_cli
retracted

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.

Component Notes
JxButton primary, secondary, outline, ghost, danger; sm, md, lg; renders a link when href is set.
JxCard Surface with an optional title.
JxBadge neutral, info, success, warning, danger.
JxAlert role="alert" for warning and danger, role="status" otherwise.
JxTextField Label, hint and error linked to the input (for, aria-describedby, aria-invalid).

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

Installation #

dart pub add jx_ui
dart pub add dev:jx_cli     # 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

unknown (license)

Dependencies

jaspr

More

Packages that depend on jx_ui