@arkyn/components is the React UI layer of Arkyn. It provides ready-to-use components, client-side hooks, context providers, and a few utility helpers that work together to build consistent interfaces with less boilerplate.@arkyn/components?useModal, useDrawer, useToast, and useForm connect UI with shared application state.ClientOnly and useHydrated help avoid hydration mismatches in mixed server/client rendering.toHtml and toRichTextValue convert between editor models and HTML.bash
bun add @arkyn/components
main.tsx, index.tsx, root.tsx or App.tsx), import the component styles:tsx
import "@arkyn/components/dist/bundle.css";
globals.css, app.css or variables.css) and add the following CSS variables that are used by the library:css
:root {--white: #ffffff;/* background */--background: #f4f4f5;--background-foreground: #ffffff;/* modal, drawer, popover... */--card: #ffffff;--card-foreground-primary: #fafafa;--card-foreground-secondary: #f1f5f9;--card-foreground-third: #e2e8f0;/* skeleton */--skeleton: #f8fafc;--skeleton-foreground: #f1f5f9;/* text */--text-heading: #18181b;--text-body: #52525b;--text-muted: #a1a1aa;/* border */--border: #e2e8f0;--default-border: #e4e4e7;/* tooltip */--tooltip-text: #f1f5f9;--tooltip-background: #0f172a;/* spotlight */--spotlight-primary: 2, 167, 105; /* #02A769 */--spotlight-secondary: 248, 250, 252; /* #f8fafc */--spotlight-success: 16, 185, 129; /* #10b981 */--spotlight-danger: 244, 63, 94; /* #f43f5e */--spotlight-info: 14, 165, 233; /* #0ea5e9 */--spotlight-accent: 234, 179, 8; /* #EAB308 */--spotlight-warning: 249, 115, 22; /* #f97316 *//* toast */--toast-success: 16, 185, 129; /* #10B981 */--toast-danger: 225, 29, 72; /* #E11D48 */--toast-info: 14, 165, 233; /* #0EA5E9 */--toast-warning: 251, 146, 60; /* #FB923C */}
@arkyn/components and @arkyn/shared.