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 extension, how to use icons, and the styling system, including Tailwind CSS, typography classes, and theme tokens.
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 |
|
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 extension components. The full Tailwind CSS utility set is available.
<div className="flex flex-col gap-4 p-6 rounded-lg border border-neutral-200 bg-white">
<h2 className="text-lg font-semibold">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 extension the same CSS custom properties used by the host and all host components, for example --color-neutral-100 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.