@eleventheye/asui
v3.2.0
Published
AS UI React Library by eleventheye (another one!)
Maintainers
Readme
asui
AS React UI Library (another one!)

- asui
- Contributing
- Theming
- Available components
- ASButton · Reference
- ASIconButton · Reference
- ASTextField · Reference
- ASDropdown · Reference
- ASSwitch · Reference
- ASChoiceBar · Reference
- ASChoiceBarItem · Reference
- ASModal · Reference
- ASSnackbar · Reference
- ASLoader · Reference
- ASChartCartesian · Reference
- ASChartHBar · Reference
- ASChartVBar · Reference
- ASChartDonut · Reference
- ASIcon and SVG icons · Reference
- ASTappable · Reference
- Available Utilities
Contributing
See Component development workflow for adding or modifying components, documenting theme properties, validation, and ticket handoff. Follow Commit syntax and release workflow for branches and commits.
Theming
Apply a complete project theme once with ASThemeProvider. See Applying an ASUI theme for inheritance, local replacements, compatibility details, and examples.
See the Theme property reference for available tokens and component properties, descriptions, and classic/neutral default values for every size.
Available components
Import components from @eleventheye/asui. Examples below use application-owned values and named handlers; follow each reference for the full API, defaults, and accessibility requirements.
ASButton · Reference
A themed action button with ASTappable pointer handling by default, native HTML button behavior through as="button", and link behavior through as="a".
Example
import { ASButton } from '@eleventheye/asui';
<ASButton as="button" onClick={handleSave} isLoading={isSaving}>
Save changes
</ASButton>ASIconButton · Reference
An icon-only action with selection, loading, and disabled states. Supports ASTappable, native button, and link behavior. All modes support SVG and factory-created glyph icons.
Example
import { ASIconButton, SearchIcon } from '@eleventheye/asui';
<ASIconButton as="button" icon={SearchIcon} aria-label="Search" onClick={handleSearch} />ASTextField · Reference
A single-line input with optional icons, clearing, and validation feedback. The same component supports multiline text and character counts through multiline; there is no separate ASTextArea export.
Example
import { ASTextField } from '@eleventheye/asui';
<ASTextField aria-label="Email address" type="email" value={email} onChange={setEmail} errorMessage={emailError} />
<ASTextField multiline aria-label="Message" value={message} onChange={setMessage} rows={4} />ASDropdown · Reference
A themed native select for string options, with optional leading icon and placeholder. Its popup uses the browser's native presentation; theme properties control the field's appearance.
Example
import { ASDropdown } from '@eleventheye/asui';
<label htmlFor="sort-order">Sort order</label>
<ASDropdown id="sort-order" options={['Newest', 'Oldest']} value={sortOrder} onChange={setSortOrder} />ASSwitch · Reference
A controlled on/off switch with an accessible label, keyboard activation, and themed track and thumb. The parent owns its checked state.
Example
import { ASSwitch } from '@eleventheye/asui';
<ASSwitch checked={notificationsEnabled} onChange={setNotificationsEnabled} label="Notifications" />ASChoiceBar · Reference
A responsive item selector. Desktop shows a horizontal option list; mobile shows the selected option and opens a picker. Both support previous/next selection. The component reports item IDs and does not manage routes.
Example
import { ASChoiceBar } from '@eleventheye/asui';
<ASChoiceBar
navItems={[
{ itemId: 'overview', displayText: 'Overview' },
{ itemId: 'details', displayText: 'Details' },
]}
selectedItemId={selectedId}
onItemSelected={setSelectedId}
/>ASChoiceBarItem · Reference
The lower-level option used by ASChoiceBar. It exposes selection appearance, activation, and measurement callbacks. Use ASChoiceBar for the complete selection and responsive-layout behavior.
Example
import { ASChoiceBarItem } from '@eleventheye/asui';
<ASChoiceBarItem
itemId="overview"
displayText="Overview"
selected={selectedId === 'overview'}
onItemClick={handleItemTap}
onActivate={handleItemActivate}
/>ASModal · Reference
A controlled, portaled overlay with themed backdrop and content surface. The application supplies its content, close controls, and dismissal handling.
Example
import { ASButton, ASModal } from '@eleventheye/asui';
<ASModal isOpen={detailsOpen} onBackdropClick={handleCloseDetails}>
<h2>Details</h2>
<ASButton as="button" onClick={handleCloseDetails}>Close</ASButton>
</ASModal>ASSnackbar · Reference
A temporary notification with optional dismissal and a finite lifetime. The application owns visibility and any notification queue.
Example
import { ASSnackbar } from '@eleventheye/asui';
<ASSnackbar
open={savedNoticeOpen}
message="Changes saved."
variant="success"
duration={5000}
onClose={handleCloseNotice} />ASLoader · Reference
An indeterminate loading indicator with grow, spin, and dots variants. Supports sizes and optional modal presentation; see its theme properties.
Example
import { ASLoader, LoaderType } from '@eleventheye/asui';
<ASLoader showLoader={isLoading} loaderType={LoaderType.Spin} />ASChartCartesian · Reference
A Cartesian grid with dot or custom markers and optional connections in input order.
Example
import { ASChartCartesian } from '@eleventheye/asui';
<ASChartCartesian label="Observation route" series={[{ id: 'route', points, connected: true }]} />ASChartHBar · Reference
A horizontal percentage bar with solid or striped fill, endpoint labels, and configurable direction. Explicit data colors override theme defaults.
Example
import { ASChartHBar } from '@eleventheye/asui';
<ASChartHBar value={65} barKind="solid" startLabel="0%" endLabel="65%" />ASChartVBar · Reference
A vertical percentage bar supporting upward or downward fill. Shares fill styles and theme properties with ASChartHBar.
Example
import { ASChartVBar } from '@eleventheye/asui';
<ASChartVBar value={65} direction="up" barKind="striped" startLabel="0%" endLabel="65%" />ASChartDonut · Reference
One to four concentric percentage arcs with independently configurable data colors, tracks, and central labels. Ring values are independent and do not need to add up to 100.
Example
import { ASChartDonut } from '@eleventheye/asui';
<ASChartDonut value={75} secondaryValue={50} donutLabel="75%" donutSubLabel="Completed" />ASIcon and SVG icons · Reference
Named SVG icons share ASIcon's stroke, fill, sizing, and optional circle decoration. Fills are transparent by default; pass fillColor to fill the SVG path.
Example
import { SearchIcon, HeartIcon } from '@eleventheye/asui';
<SearchIcon iconSize={24} aria-hidden="true" />
<HeartIcon iconSize={32} color="#b42318" fillColor="#fda29b" role="img" aria-label="Favorite" />![]()
ASTappable · Reference
A lower-level pointer/tap wrapper used by ASUI controls. It exposes onTapped; it does not supply button semantics or keyboard activation. Use ASButton or ASIconButton for ordinary actions.
Example
import { ASTappable } from '@eleventheye/asui';
<ASTappable onTapped={handleSurfaceTap}>
<span>Pointer interaction surface</span>
</ASTappable>Available Utilities
Icon factory
createGlyphIcon · Reference
Create reusable font-icon components once in an application icon module. The application loads the font; components import the icons they need.
Example
import { createGlyphIcon } from '@eleventheye/asui';
export const RefreshIcon = createGlyphIcon({
glyph: 'refresh',
fontFamily: 'Material Symbols Rounded',
weight: 300,
});
// In a component: <RefreshIcon iconSize={24} aria-label="Refresh" />