Skip to content

Gea UI Overview

@geajs/ui is a component library for Gea that provides robust, accessible UI primitives. Interactive components are powered by Zag.js state machines — giving you full keyboard navigation, ARIA attributes, and focus management out of the box — while simple styled components offer consistent Tailwind CSS styling with variant support.

Installation

bash
npm install @geajs/ui

@geajs/ui has a peer dependency on @geajs/core ^1.0.0.

Quick Example

tsx
import { Component } from '@geajs/core'
import { Button, Dialog, Switch } from '@geajs/ui'
import '@geajs/ui/style.css'

export default class App extends Component {
  template() {
    return (
      <div>
        <Button variant="outline">Click me</Button>

        <Switch label="Dark mode" onCheckedChange={(d) => console.log(d.checked)} />

        <Dialog title="Confirm" description="Are you sure?" triggerLabel="Open">
          <Button variant="destructive">Delete</Button>
        </Dialog>
      </div>
    )
  }
}

Components at a Glance

Styled Components

Thin wrappers with Tailwind styling and variant support — no JavaScript state machines.

ComponentPurpose
ButtonPrimary action element with variant and size props
CardContent container with header, body, and footer slots
InputText input with consistent styling
TextareaMulti-line text input
LabelForm label
BadgeStatus indicator with variant support
AlertInline notification with title and description
SeparatorHorizontal or vertical divider
SkeletonLoading placeholder

Interactive Components (Zag-Powered)

Backed by Zag.js state machines — full keyboard navigation, ARIA attributes, and focus management.

ComponentPurpose
DialogModal dialog with focus trap and backdrop
TabsTab panel with keyboard switching
AccordionExpandable sections
TooltipInformational popup on hover
PopoverFloating content panel anchored to a trigger
MenuDropdown menu with typeahead
SelectDropdown select with keyboard navigation
ComboboxSearchable dropdown
SwitchToggle switch
CheckboxCheckbox with indeterminate support
Radio GroupRadio button group
SliderRange slider
Number InputNumeric stepper
Pin InputVerification code input
Tags InputTag entry field
Toggle GroupSingle or multi-select toggle buttons
ProgressProgress bar
Rating GroupStar rating input
ClipboardCopy-to-clipboard with feedback
AvatarUser avatar with fallback
CollapsibleSingle expand/collapse section
Hover CardRich preview on hover
PaginationPage navigation controls
File UploadFile picker with drag-and-drop
ToastTemporary notification messages
Tree ViewHierarchical tree

Next Steps

Released under the MIT License.