@zenith-visuals/core
v0.1.2
Published
Core theming, context, primitives and shared types for Zenith Visuals.
Maintainers
Readme
@zenith-visuals/core
Core theming, context, primitives and shared types for Zenith Visuals.
Part of Zenith Visuals — the ultimate React visualization SDK. TypeScript-first, tree-shakeable, SSR-safe and accessible.
Install
npm install @zenith-visuals/coreRequires
react(>=18) as a peer dependency where applicable.
Usage
import { ThemeProvider, useTheme } from "@zenith-visuals/core";
// 1. Wrap your app once. mode: "light" | "dark" | "system".
export function App() {
return (
<ThemeProvider mode="system">
<Panel />
</ThemeProvider>
);
}
// 2. Read the resolved theme anywhere below the provider.
function Panel() {
const theme = useTheme();
return (
<div style={{ background: theme.colors.surface, color: theme.colors.text }}>
Hello Zenith
</div>
);
}Building your own visualization? VisualizationContainer gives you a responsive,
SSR-safe, themed canvas with built-in loading/empty/error states, and Tooltip
renders themed, positioned tooltips.
Documentation
See the main README for the full API, theming and more examples.
License
MIT
