Foundations
Platforms
Install the alpha packages and connect one locale and theme controller to your application.
Install the web package
@cave-ui/core 0.1.0-alpha.1 · @cave-ui/tokens 0.1.0-alpha.1
npm install ./cave-ui-core-0.1.0-alpha.1.tgz
import '@cave-ui/core/tokens.css';
import '@cave-ui/core/styles.css';
import { createCave } from '@cave-ui/core';
const ui = createCave({
locale: 'en',
theme: 'system',
storageKey: 'my-app-appearance'
});
ui.setLocale('ar');
ui.setTheme('dark');
// Your application updates its own translated content.
document.documentElement.addEventListener('cave:change', event => {
console.log(event.detail);
});
The web core has no external runtime dependencies. Imports are server-safe; create the controller in the browser. The optional legacy.css supports cv- names during migration to cave-.
Install the Flutter package
Extract the archive into your project’s vendor directory, add the path to pubspec.yaml, then run flutter pub get.
dependencies:
cave_ui:
path: vendor/cave_ui
final controller = CaveController(locale: const Locale('en'));
CaveApp(controller: controller, home: const MyHomePage());
controller.setLocale(const Locale('ar'));
controller.setTheme(CaveThemeMode.black);
Requires Flutter 3.35 or newer. Direct dependencies are Flutter and its localization SDK, which brings transitive dependencies such as intl. No external state manager or icon library is required.
One source, explicit releases
Language and direction
English and Arabic are supported throughout the component catalog. A locale switch updates direction and library labels; application text still comes from your own translation resources. Region-specific locales such as ar-LB and en-GB can be used for formatting. Numbering systems and calendars are product decisions; do not assume every Arabic user prefers the same digits.
On web, create one createCave controller per application root. Use setLocale, setTheme and setDirection to update it. Listen for cave:change to update application-owned text. In Flutter, CaveController notifies listeners and CaveApp updates locale, direction and themes. Existing applications can use CaveTheme without adopting the optional app shell.
Interaction and accessibility
Use semantic buttons, labels, inputs, links and dialogs. Every interactive control needs a visible or accessible name and a visible focus indicator. Dialogs contain focus and return it to their trigger. Tabs support arrows, Home and End. Do not mirror logos or all icons automatically; mirror directional arrows according to their meaning.
Errors explain how to recover and remain visible until resolved. Status messages use words as well as colour. Test mouse, touch and keyboard input, including clicking the full label around a control.
Customization
Use semantic tokens rather than hard-coded colours. Scope custom CSS variables to the application root. Configure fonts explicitly when bundling them. Generic components carry no Cave logo or required attribution inside the interface.
Evaluation status
Packages remain alpha evaluation builds. Registry publication is paused. Website releases are tracked separately; consult the repository release notes for the deployed revision. Pin the version and review the changelog before upgrading. Theme and locale switches act at runtime; package updates remain explicit versioned releases.
Code in the packages is MIT licensed. Open fonts retain their own SIL Open Font License notices. Cave brand assets have separate terms and are not included in these packages.