@douglasneuroinformatics/libui
v3.7.2
Published
Generic UI components for DNP projects, built using React and Tailwind CSS
Downloads
508
Readme
About
A React component library built by the Douglas Neuroinformatics Platform (DNP) using shadcn/ui with React and TailwindCSS. Although primarily intended for internal use in our platforms, it is designed as a generic implementation.
Installation
pnpm install @douglasneuroinformatics/libui
Usage
tailwind.config.cjs
const config = require('@douglasneuroinformatics/libui/tailwind/config');
module.exports = config({
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}']
});
i18n.ts
import { init } from '@douglasneuroinformatics/libui/i18n';
import common from './common.json';
declare module '@douglasneuroinformatics/libui/i18n' {
export namespace UserConfig {
export interface LanguageOptions {
en: true;
es: true;
fr: true;
}
export interface Translations {
common: typeof common;
}
}
}
init({ translations: { common } });
main.tsx
import '@douglasneuroinformatics/libui/tailwind/globals.css';
import './i18n';
Contributing
We welcome contributions! If you're interested in improving the library or adding new features, please refer to our contribution guide.
License
Copyright (C) 2024 Douglas Neuroinformatics Platform
This program is free software: you can redistribute it and/or modify it under the terms of the Apache License 2.0.