GitLab Pajamas Design System expert for building UIs with Pajamas components and patterns. Use when: (1) implementing UI that should follow GitLab's Pajamas design system, (2) selecting or configuring Pajamas/GlComponent components (GlButton, GlAlert, GlModal, etc.), (3) translating Figma designs into Pajamas-compliant code, (4) questions about Pajamas component usage, variants, categories, or accessibility, (5) building GitLab-style interfaces, or (6) the user mentions "Pajamas", "GitLab UI", "Gl components", or "design system" in a GitLab context. Works hand-in-hand with the implement-design skill and Figma MCP tools.
75
92%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Provides expertise for implementing UIs using GitLab's Pajamas Design System, drawing from the single source of truth (SSoT) documentation and design token definitions bundled in this skill.
Before answering any question or performing any task, check whether the local reference files exist. If the references/pajamas-docs/ directory is missing or empty, you MUST populate it by running the following commands from this skills directory:
bash scripts/update-refs.sh
python3 scripts/build-index.py
python3 scripts/build-token-map.pyThese scripts clone the upstream Pajamas repository, extract docs and design tokens into references/, and build the component index and token map. The references/ directory is gitignored — it is always populated locally via these scripts.
Do not skip this step. The reference files are required for all component lookups, token resolution, and design guidance below.
Before creating or scaffolding a new project, always check the peerDependencies of @gitlab/ui to determine compatible framework versions. Then pick a project scaffold that satisfies those constraints.
peerDependencies: Run npm info @gitlab/ui peerDependencies --json (or inspect the package.json in the installed package) to discover required Vue version, etc.@gitlab/ui requires vue@^2.7, do not scaffold a Vue 3 / Vite project — use a Vue 2.7-compatible setup instead.ERESOLVE or peer-dependency warnings. Resolve any conflicts before writing component code.NEVER write absolute/hardcoded values for colors, spacing, typography, borders, shadows, or any visual property. Always use Pajamas design tokens instead.
This applies to ALL output — CSS, SCSS, HTML attributes, inline styles, utility classes. No exceptions.
color: #1f75cb — use var(--gl-color-blue-500) or a semantic tokenpadding: 16px — use a spacing token via utility class or CSS variablefont-size: 14px — use var(--gl-font-size-200) or equivalentborder-radius: 4px — use var(--gl-border-radius-base) or equivalentbackground: white or color: black — use var(--gl-background-color-default) and var(--gl-text-color-default)When you see an absolute value in a Figma design, existing code, or user request:
--gl-text-color-subtle (semantic) over --gl-color-neutral-500 (constant) — semantic tokens adapt across color modes (dark mode, high contrast)GlButton, GlAlert, etc. which apply tokens automaticallygl-bg-subtle, gl-text-default, gl-p-3, gl-rounded-basevar(--gl-background-color-default) when utilities don't cover the case| File | Use for |
|---|---|
| references/design-tokens/token-map.md | Primary lookup: reverse-maps absolute values to tokens, forward-maps tokens to values |
| references/design-tokens/tokens.css | Full CSS custom properties (light mode resolved values) |
| references/design-tokens/tokens.dark.css | Dark mode resolved values |
references/design-tokens/source/semantic/ | Semantic token definitions with $description and dark mode mappings |
references/design-tokens/source/contextual/ | Component-specific token definitions |
references/design-tokens/source/constant/ | Base constant values (color ramps, spacing scales) |
| references/pajamas-docs/product-foundations/design-tokens.md | Conceptual overview: categories (constant/semantic/contextual), concepts (action, control, feedback, status, highlight) |
| references/pajamas-docs/product-foundations/design-tokens-using.md | Usage guide: components vs. utilities vs. CSS custom properties, dark mode patterns |
The authoritative Pajamas docs live at references/pajamas-docs/ within this skill, mirroring the contents/ directory of the upstream repo. Design token definitions live at references/design-tokens/. These files are not committed to git — they are populated locally by running the initialization scripts (see above).
git@gitlab.com:gitlab-org/gitlab-services/design.gitlab.com.git (branch: main)
contents/packages/gitlab-ui/src/tokens/bash scripts/update-refs.sh then python3 scripts/build-index.py && python3 scripts/build-token-map.pyreferences/pajamas-docs/{reference_file} (e.g., references/pajamas-docs/components/button.md) for detailed usage, variants, props, examples, and accessibility guidancerelated: list — review related components when choosing between alternativesWhen searching for a component by function rather than name, grep the component-index.md descriptions or search the references/pajamas-docs/ directory.
If a Code Connect mapping exists for a Figma node, you MUST use that component. Do not reimplement it with raw HTML/CSS.
When matching a Figma element to a Pajamas component, follow this lookup chain in order:
@gitlab/ui component, use it. This is authoritative; no further lookup needed.@gitlab/ui component.Only after exhausting all five steps may you fall back to custom HTML/CSS — and even then, you must use Pajamas design tokens (never absolute values).
This skill complements the implement-design skill. When implementing a Figma design for a GitLab project:
During Step 5 (Translate to Project Conventions) of the implement-design workflow:
The GitLab Pajamas component library is published as @gitlab/ui. It requires Vue 2.7.
Key components (non-exhaustive):
| Import | Purpose |
|---|---|
GlButton | Actions and navigation triggers |
GlCheckbox | Boolean form input |
GlAvatar | User / project identity |
GlSearchBoxByType | Inline search-as-you-type |
GlBreadcrumb | Hierarchical navigation |
GlAlert | System feedback messages |
GlModal | Confirmation / dialog overlays |
GlDrawer | Contextual side panel |
GlTabs | Tabbed content areas |
GlTable | Data rows and columns |
GlToggle | On/off switches |
GlBadge | Status metadata |
GlLabel | Categorization |
GlLink | Navigation to URL |
All imports come from @gitlab/ui:
import { GlButton, GlCheckbox, GlAvatar } from '@gitlab/ui';For the full catalog see references/component-index.md.
Gl prefix — GlButton, GlAlert, GlModal, GlDrawer<gl-button>, <gl-alert>, <gl-modal>Pajamas::ComponentName — Pajamas::ButtonComponentprimary, secondary, tertiary (visual prominence)default, confirm, danger (semantic intent), or info, warning, success, danger (feedback)small, medium (default)Pajamas uses gl- prefixed utility classes (e.g., gl-mt-3, gl-mb-5, gl-flex). These map to Pajamas design tokens for spacing, color, and layout. Always use these instead of raw Tailwind or custom CSS.
Using color scale values directly like .gl-text-green-900 or .gl-bg-white is deprecated. Use semantic utilities: .gl-text-subtle, .gl-bg-default.
When deciding which component to use:
| Need | Component | SSoT Reference |
|---|---|---|
| Trigger an action | GlButton | components/button.md |
| System feedback message | GlAlert | components/alert.md |
| Temporary notification | GlToast | components/toast.md |
| Confirm destructive action | GlModal | components/modal.md |
| Contextual side panel | GlDrawer | components/drawer.md |
| Boolean input | GlCheckbox | components/checkbox.md |
| Single choice from group | Radio button | components/radio-button.md |
| Text entry | GlFormInput / GlTextarea | components/text-input.md |
| Select from list | GlCombobox | components/dropdown-combobox.md |
| Menu of actions | Disclosure | components/dropdown-disclosure.md |
| Tabbed content | GlTabs | components/tabs.md |
| Data in rows/columns | GlTable | components/table.md |
| Show/hide content | GlAccordion / GlCollapse | components/accordion.md |
| Navigate hierarchy | GlBreadcrumb | components/breadcrumb.md |
| Page-level navigation | Pagination | components/pagination.md |
| User identity | GlAvatar | components/avatar.md |
| Status metadata | GlBadge | components/badge.md |
| Additional info on hover | GlTooltip / GlPopover | components/tooltip.md |
| Loading state | GlSkeletonLoader / GlSpinner | components/skeleton-loader.md |
| Date selection | Date picker | components/date-picker.md |
| Categorize objects | GlLabel | components/label.md |
| Navigate to URL | GlLink | components/link.md |
| Process steps | GlPath / Stepper | components/path.md |
| On/off toggle | GlToggle | components/toggle.md |
| Search | Search component | components/search.md |
| Filter content | Filter | components/filter.md |
| Segmented options | Segmented control | components/segmented-control.md |
SSoT references in the table above are relative to references/pajamas-docs/. For the full catalog, see references/component-index.md.
Pajamas defines higher-level interaction patterns. Always check the relevant pattern doc when implementing:
| Pattern | When to reference | SSoT Reference |
|---|---|---|
| Forms | Any form layout | patterns/forms.md |
| Empty states | No-data views | patterns/empty-states.md |
| Loading | Async content | patterns/loading.md |
| Saving & feedback | After mutations | patterns/saving-and-feedback.md |
| Destructive actions | Delete/remove flows | patterns/destructive-actions.md |
| Navigation sidebar | App navigation | patterns/navigation-sidebar.md |
| Notifications | System alerts | patterns/notifications.md |
| Filtering | List/table filters | patterns/filtering.md |
| Search | Search UX | patterns/search.md |
| Feature discovery | New feature callouts | patterns/feature-discovery.md |
| AI interactions | Duo/AI features | patterns/duo-chat.md |
SSoT references above are relative to references/pajamas-docs/.
Every Pajamas implementation must meet WCAG AA. Key rules:
aria-label on icon-only buttonsreferences/pajamas-docs/accessibility/a11y.md for comprehensive guidelinesPull the latest docs and token definitions from upstream, then regenerate indexes:
bash scripts/update-refs.sh
python3 scripts/build-index.py
python3 scripts/build-token-map.pyf5efc36
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.