Cool UI toolkit usage — JavaScript components, CSS utility classes, theming with CSS custom properties, and integration into projects
Use this skill when:
<script>, or jQuerynpm install @finqu/cool<link rel="stylesheet" href="@finqu/cool/dist/css/cool.css">
@use "@finqu/cool/scss/cool";
// ESM (tree-shakeable)
import { Common, Toast, Dialog, Dropdown } from '@finqu/cool';
// UMD bundle (includes jQuery + PerfectScrollbar)
<script src="@finqu/cool/dist/js/cool.bundle.js"></script>
// UMD standalone (bring your own jQuery)
<script src="jquery.js"></script>
<script src="@finqu/cool/dist/js/cool.js"></script>
Common.initialize();
// or with global settings:
Common.initialize({
toast: { placement: 'bottom-right', dismiss: 5 },
select: { showSearch: true }
});
Read: references/integration.md
data-toggle="{component}" to trigger elements. Common.initialize() auto-discovers and instantiates them.data-* attributes on the element.Read: references/components.md
new Dropdown(triggerEl, { placement: 'top' }).Dropdown.getInstance(el).instance.show(), instance.close(), instance.destroy().Common.initComponent(selector) or Common.refresh().Read: references/components.md
--cool-{component}-{property} pattern:
:root {
--cool-btn-bg: #3b82f6;
--cool-btn-border-radius: 4px;
--cool-dropdown-bg: #1e293b;
--cool-toast-border-radius: 12px;
}
.d-flex, .gap-2, .p-3, .text-center, etc.--cool-theme-color-{name} (primary, secondary, success, info, warning, danger, light, medium, dark, brand).data-theme="dark" on a parent element, or use the ThemeSwitcher component.Read: references/theming.md
data-toggle elements become interactive.show, close, etc.).getData()Common.initialize() is called after DOM ready and data-toggle value matches a component namewindow.Cool.settings override DEFAULTSdata-placement and data-position attributes; ensure parent is not overflow: hiddenToast.getInstance(document.body) or window.Cool.getToast(), then call .init({ content: '...' })instance.getData() to inspect; use instance.setData() to set programmatically--cool-{component}-{property} conventioncool.js or cool.bundle.js), not the ESM builddropdown.js, toast.js, select.js, dialog.js) for the full API