Styling and Components#
Warning
Project Neo is currently in Technical Preview. Features described in this section may change before general availability.
This page covers the UI components available to your bundle, how to use icons, and the styling system, including Tailwind CSS, typography classes, and theme tokens.
Component Catalog#
neo-catalog.squirro.com is the interactive catalog of everything a bundle can import from @squirro/nextgen-core, and the fastest way to discover what is available and how to use it. It covers the full public surface: the UI primitives (@squirro/nextgen-core/components) and the item widgets (@squirro/nextgen-core/items), each with a live preview and documentation generated from the actual TypeScript types.
Each component page provides:
A live preview you can interact with, plus controls to try out variants and props without writing code.
A prop table generated from the component TypeScript types, including descriptions.
Copy-paste import examples using the public package paths, exactly what you write in a bundle.
A “Show code” option on every example to see the full source.
To use the catalog:
Browse the sidebar. The components section holds the UI primitives, such as buttons, forms, dialogs, and charts. The widgets section holds the higher-level item widgets, such as item cards, item lists, and item detail.
Open the docs page for a component to see the prop table and usage examples.
Copy the import from the docs page straight into your dashboard.
To browse the catalog offline, or to see the exact component surface of the @squirro/neo-ui version installed in your bundle, serve the copy that ships with the CLI:
neo-ui catalog
For command details, see the CLI Reference page.
Host Components#
The @squirro/nextgen-core/components package exports the same UI components used throughout the host application. Using them keeps your dashboards visually consistent with the rest of the product.
import {
Button,
Card,
CardContent,
CardHeader,
CardTitle,
Input,
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@squirro/nextgen-core/components';
The full component list, organized by category:
Category |
Components |
|---|---|
Actions |
|
Layout |
|
Forms |
|
Select |
|
Dialog |
|
Popover |
|
Tooltip |
|
Dropdown Menu |
|
Navigation |
|
Feedback |
|
Charts |
|
Icons |
|
Utility |
|
Icons#
lucide-react is included in the scaffolded project dependencies. Use icons directly in your components without any additional installation:
import { BarChart3, FileText, Users } from 'lucide-react';
function Analytics() {
return (
<div className="flex items-center gap-2">
<BarChart3 className="size-5" />
<span>Analytics</span>
</div>
);
}
Browse all available icons at lucide.dev/icons.
Alternatively, load an icon by its kebab-case name at runtime using DynamicIcon:
import { DynamicIcon } from '@squirro/nextgen-core/components';
<DynamicIcon name="bar-chart-3" className="size-5" />
DynamicIcon lazy-loads and caches the icon. If the name is invalid, it renders nothing.
Tailwind CSS#
Tailwind utility classes work out of the box in all bundle components. The full Tailwind CSS utility set is available.
Use the host semantic color tokens (bg-card, bg-background, border-border, text-foreground, text-muted-foreground, bg-primary, and so on) rather than fixed Tailwind color scales such as bg-white or border-neutral-200. Semantic tokens follow the active brand theme and adapt to light and dark mode automatically, while hardcoded colors do not.
<div className="flex flex-col gap-4 p-6 rounded-lg border border-border bg-card">
<h2 className="text-lg font-semibold text-foreground">Summary</h2>
</div>
Typography Classes#
The host defines custom typography classes that map to the design system. Use these instead of raw font specifications.
Note
These classes are defined in the host CSS and are available at port 5555 and in production. They do not apply in the standalone preview at port 3001.
Class |
Size and weight |
|---|---|
|
24px / 600 |
|
20px / 600 |
|
18px / 600 |
|
16px / 400 |
|
16px / 500 |
|
16px / 600 |
|
14px / 400 |
|
14px / 500 |
|
14px / 600 |
|
12px / 400 |
|
12px / 500 |
Theme Tokens#
The scaffolded src/index.css already includes the following import, so no manual step is needed:
@import '@squirro/nextgen-core/styles/theme.css';
That import gives your bundle the same CSS custom properties used by the host and all host components, for example --color-primary, --color-muted, and --radius-md. Host components render correctly regardless of whether the import is present, as the host applies the theme globally. Without it, those custom properties are not available in your own CSS.