@humain/ui
v2.8.4
Published
HUMAIN UI - React components, design tokens, and Web Components
Maintainers
Readme
@humain/ui
Reusable React components, design tokens, and Web Component wrappers for building consistent product interfaces.
Install
npm install @humain/ui lucide-reactImport the stylesheet once in your application entry point, then import the components you need:
import '@humain/ui/styles.css';
import { Button, ThemeProvider } from '@humain/ui';
export function App() {
return (
<ThemeProvider>
<Button>Continue</Button>
</ThemeProvider>
);
}The package also provides @humain/ui/tokens.css for tokens only and
@humain/ui/one.css for HUMAIN One styling.
Localized accessible names
Consumers own translations; the library does not infer labels from lang or
dir. These optional props accept complete, nonempty accessible names and
retain English defaults when omitted:
| Component | Prop | Default |
| --- | --- | --- |
| AIInput / AIInput.Root | sendLabel | Send message |
| AIInput / AIInput.Root | clearLabel | Clear input |
| AppSidebar / AppSidebar.Skeleton | expandLabel | Expand sidebar |
| AppSidebar / AppSidebar.Skeleton | collapseLabel | Collapse sidebar |
| AIClarificationCardChoiceSchema | otherInputLabel | Other details for <title> |
sendLabel covers all built-in default, compact, and inline send buttons.
clearLabel names the existing default-variant clear button; compact and inline
do not gain a clear button. Custom submitButton / defaultButton renderers
still own their accessible names. An explicit AIInput.SendButton aria-label
takes precedence over the root's sendLabel. Standalone AIInput.SubmitButton
continues to accept its existing aria-label.
Sidebar toggle labels belong on AppSidebar, not AppSidebar.Header, which
only wraps layout children. Reuse AppSidebar.Nav aria-label for the navigation
landmark and AIInput.dropText / AIInput.Root.dropText for attachment guidance.
otherInputLabel replaces the entire single-select Other textbox name;
no English suffix is appended. Without it, the legacy fallback remains
<otherLabel or "Other"> details for <title>. The visible Other option still
uses otherLabel; its placeholder and help use otherPlaceholder and
otherHelpText.
These additions are unreleased. An installed @humain/[email protected] consumer needs
a release or approved backport before it can use them.
Workflow ownership
Workflow editors and standalone visuals belong to @humain/workflow, not UI. Import visual components and their public props/types from @humain/workflow/primitives, and load both packages' styles.css files. Workflow is React-only; no Web Components. Generic UI Web Components remain supported.
UI 2.8.0 and Workflow 0.1.0 introduce an intentional UI minor-version breaking exception: the six old Workflow React families and their WC/WC-React entrypoints are retired without compatibility re-exports or a replacement WC package. Workflow's UI peer is ^2.8.0; React 18/19 remain supported. Reference: /workflow/storybook/?path=/docs/workflow-docs-overview--docs. Use these coordinated versions together when migrating Workflow integrations.
Web Components
Web Component wrappers are available for applications that do not use React:
import '@humain/ui/wc/hf-button.js';
import '@humain/ui/styles.css';<hf-button>Continue</hf-button>HUMAIN UI skills
The skill installer requires Node.js 22.20.0 or newer. This requirement is separate from the component library's runtime support.
Install the React skill interactively:
npx @humain/ui@latest skillThe pinned [email protected] installer runs its native interactive wizard for
agent selection, installation scope, and confirmation. Choose Project
(recommended) to add skills to the current project or Global to install
for your user. Use arrow keys to navigate, Space to toggle agents, and Enter
to confirm; type to search. Review the selected agents and destinations before
installing. Agent auto-detection may skip selection when only one agent is
detected. No agent IDs need to be typed into wrapper prompts.
Install the Web Component skill, or both skills, through the same wizard:
npx @humain/ui@latest skill --web-components
npx @humain/ui@latest skill --allFor non-interactive environments, provide a scope, one or more agents, and
--yes:
npx @humain/ui@latest skill --project --agent codex --yesRepeat --agent to target additional supported coding agents. Fully specified
scope and agents preserve the targeted installation behavior, including the
completion summary. Delegated interactive flows rely on native installer
output instead; cancellation does not print a wrapper success message.
Partial interactive flags
skill --globaldelegates agent selection and confirmation to the native wizard with global scope selected.skill --agent codexdelegates scope selection and confirmation to the native wizard.skill --projectwithout an explicit--agentnow fails before installation. The pinned installer has--globalbut noadd --projectflag, so the wrapper cannot safely enforce project scope while leaving agent selection interactive. Runnpx @humain/ui@latest skilland choose Project in the wizard, or usenpx @humain/ui@latest skill --project --agent codex.
The same partial-flag rules apply with --all or --web-components.
Non-TTY usage still requires --yes, an explicit scope, and at least one
--agent. The same safeguards apply inside coding-agent environments, even
with a TTY: inherited agent markers can otherwise bypass the native installer's
confirmation and overwrite existing skill directories.
