English · Español
React + TypeScript component library for data-heavy business apps: form fields, modals, accordions, tabs, panels, file upload and feedback components, all themed through CSS variables.
- About 60 components and hooks
- Form fields:
TextField,NumberField,SelectField,Checkbox,Radio,ColorPicker,RTFEditor,LogoUpload - Overlays:
Modal,Confirm,Prompt,ContextMenu,Tooltip - Layout:
Accordion,Tabs,Panel,TablePanel,Scroll,Card,CardList,StatCard - Feedback: toasts,
Skeleton,Spinner,EmptyState,ProgressRing
- Form fields:
- Token-driven theming. Components use
surface/ink/edge/status/theme-*Tailwind tokens backed by CSS variables, so one build serves every tenant brand in light and dark mode. Pairs with@edictus/theme, which generates those variables. - No domain logic. Every component is configured through props; nothing reaches into app data.
- Ships class strings, not CSS. The host's Tailwind build compiles them, so there is no stylesheet to import or override.
npm i github:luvidal/edictus-ui#<commit-sha>Peer dependencies: react and react-dom ≥ 18, lucide-react, dompurify,
browser-image-compression.
Add the package to your Tailwind content so its classes are generated:
// tailwind.config.ts
content: ['./src/**/*.{ts,tsx}', './node_modules/@edictus/ui/dist/**/*.{js,mjs}']The token names the components expect are mapped in this repo's
tailwind.config.ts.
import { useState } from 'react'
import { Button, TextField } from '@edictus/ui'
export function CompanyForm({ onSave }: { onSave: (name: string) => void }) {
const [name, setName] = useState('')
return (
<>
<TextField label="Empresa" value={name} onChange={setName} />
<Button text="Guardar" icon="Save" onClick={() => onSave(name)} />
</>
)
}Icons are referenced by their lucide name. Detailed notes live next to the code: forms, button, accordion, tabs.
npm run preview # visual test page (Vite) at http://localhost:5173
npm test # Vitest + happy-dom
npm run build # tsup → dist/ (ESM + CJS + type declarations)