frontend-style-guide
БесплатноБез исполняемых скриптовНе проверенApply the Lightdash frontend style guide and design principles when working on React components or styling frontend code. Use when editing TSX files, building…
Об этом скилле
Lightdash Frontend Style Guide
Apply these rules when working on any frontend component in packages/frontend/.
Mantine 9
The app runs on Mantine 9 (@mantine/core), with the theme in src/theme/.
Design principles
The theme is neutral and quiet, in the spirit of shadcn, Radix and Kumo: one ink accent, flat surfaces, soft borders, a tight type scale. Most of what "looks right" comes from using the defaults. Check each rule before you add a colour, a shadow or a size.
- One accent, and it is ink. The primary action on a surface is the theme primary (near-black in light, near-white in dark). Never colour a Button or ActionIcon
blue,dark,indigoorldDarkfor emphasis. Colour on a control means state:reddestructive,yellowwarning,teal"copied",orangefavourite,greenmarks verified state (the check icon, badges) and the existing merge actions, never a verify button fill. Indigo belongs to AI surfaces. Links are the only blue text. - Hierarchy comes from variant, not colour.
filledis the one primary action per card, header or modal footer.default(bordered) is secondary.lightis a tertiary or toggle-like action ("Add filter").subtleis for icon buttons and inline actions; it is the ActionIcon default. If a surface has two filled buttons, one of them is wrong. - Surfaces are flat. Paper and Card are bordered with no shadow and a 12px radius by default; shadows only on floating layers (Menu and Popover
md, Modallg). Do not passwithBorder,shadoworradiusto restate that. Empty or placeholder sections use<Paper variant="dotted">. - Neutrals are tokens, never hand-picked pairs.
--mantine-color-body(surface),--ld-color-page(canvas),default-border,default-hover,text,dimmed,placeholder.ldGray.Nalready resolves per scheme (0 canvas, 1 muted fill, 2 border, 3 strong border, 5 tertiary text, 6 = dimmed, 7 label, 9 text), solight-dark(ldGray-x, ldDark-y)and@mixin darkblocks for neutrals are always a smell. Secondary text isc="dimmed". - Type is a scale, not a slider. Body is 14/20. Headings are 600 on
Titleorders 1 to 6 (28 to 14px); labels and table headers are 500; everything else 400. Usefz="xs|sm|md", neverfz={13}. Card and section titles areTitle order={5}; page tops usePageHeader. - Space on the token grid. Card padding
md, group gapsxs/sm, section gapslg, page gutterslg/xl. No pixel margins; if a layout needsmargin-top: 20pxit ismt="lg". - Icons are quiet.
MantineIconat stroke 1.5, 16px next to text and 14px in xs controls, coloureddimmedwhen they are secondary. Every icon-only button has anaria-labeland a Tooltip. - Inputs are calm. Default variant, soft border, focus is a darker border with no ring.
size="xs"controls carry compact secondary labels automatically. Selects mark the selected option with a check; filter value pickers are the standard combobox, not a custom list. - Motion is functional. Dropdowns pop from their anchor and modals fade, both from the theme. Nothing else animates unless it shows progress.
- Dark mode is designed, not derived. Check both schemes before you finish. Never read
useMantineColorSchemeto pick a colour; use a token. Editors takeuseEditorTheme(); only JS consumers with no CSS (ECharts, Leaflet) readuseComputedColorScheme. - States are shared components.
EmptyStateLoaderfor loading,InlineErrorStatefor a failed section,SuboptimalStatefor a failed page,<Paper variant="dotted">for "nothing here". - Before writing CSS, look for the thing that already exists: a variant, a token, an
ld-*utility class, or a shared control (CopyActionIcon,FavoriteActionIcon,ConfirmDeleteButton,TruncatedText,FilterFacet,NumberInput,MantineModal).
Self-review before you hand a screen over: open it in light and dark; count filled buttons per surface (max one); look for blue that is not a link; look for a shadow on a card; look for a font size or grey that is not a token; look for an icon button without a tooltip. The Explorer page is the reference surface when in doubt.
Component Checklist
When creating/updating components:
- Use
@mantine/coreimports - No
styleorstylesprops - Check Mantine docs/types for available component props
- Use inline-style component props for styling when available (and follow <=3 props rule)
- Use CSS modules when component props aren't available or when more than 3 inline-style props are needed
- No "Lightdash" meaning "this app" in error messages, or in labels of embed-reachable components (see
docs/white-label-copy.md) - No Lightdash branding or docs links in embeds: gate them with
useIsEmbedded()(see "Embeds are white-label" inpackages/frontend/AGENTS.md) - Theme values ('md', 'lg', 'xl', or 'ldGray.1', 'ldGray.2', 'ldDark.1', 'ldDark.2', etc) instead of ma
Установить frontend-style-guide в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditWriteGlobGrepFAQ
Что делает скилл frontend-style-guide?
Apply the Lightdash frontend style guide and design principles when working on React components or styling frontend code. Use when editing TSX files, building or reviewing UI, fixing styling issues, or when the user mentions Mantine, design, styling, or CSS modules.
Как установить скилл frontend-style-guide?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-style-guide запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic