agentleFS
open-metadataopen-metadata/OpenMetadata/skills/ui-core-components/SKILL.md

ui-core-components

Skill15k starsChanged 3 months agoApache-2.0View on GitHub

Use when writing or editing React/TSX in `openmetadata-ui/src/main/resources/ui/src/` or `openmetadata-ui-core-components/`, before reaching for a raw `<div>` + Tailwind utility classes to build layout (flex rows/columns, grids, bordered panels with header/body/footer, separators), and before writing any Tailwind color class (`tw:bg-*`, `tw:text-*`, `tw:border-*`) or hex color value. Applies whenever the change adds or restructures a layout container or touches color/dark-mode styling, not to every div.

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 10 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 8 mentionsSep 2026: 4 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the open-metadata/OpenMetadata repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about open-metadata/OpenMetadata

The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 40

Talked about on GitHub, Bluesky and Hacker News (40 times).

On GitHub · 29

24 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 1

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only layout container divs (the ones whose className is mostly flex/grid/gap/items-*/justify-*/border-as-separator) go through a primitive.

    line 22
  2. Distinctive:

    Import from the package root:

    line 38
  3. Very specific:

    Never write a raw Tailwind palette class (tw:bg-gray-50, tw:text-red-600, tw:border-blue-500, ...) or a hardcoded hex value (style={{ …

    line 127
  4. Very specific:

    After using these, run the ui-checkstyle skill on the changed files before committing — it lints/formats both openmetadata-ui and …

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UI Core Components

@openmetadata/ui-core-components ships layout primitives that replace common <div className="tw:flex ..."> / <div className="tw:grid ..."> patterns. 383+ files in openmetadata-ui already import from this package. Baseline testing shows agents default to raw div + Tailwind for layout unless told these exist — check this table before writing layout markup.

When to use a primitive vs. a raw div

Only layout container divs (the ones whose className is mostly flex/grid/gap/items-*/justify-*/border-as-separator) go through a primitive. Leave alone: single non-layout divs, text wrappers, spans, icon wrappers, and anything built from antd/other external library form components — this is not a "replace every div" rule.

Quick reference

Raw patternUse instead
<div className="tw:flex ..."> (row)<Box>
<div className="tw:flex tw:flex-col ..."><Box direction="col">
<div className="tw:grid ..."> with column spans<Grid> + <Grid.Item span={n} start={n}>
Bordered container with a title/actions row, body, footer row<Card> + <Card.Header title=.. extra=..> / <Card.Content> / <Card.Footer>
<hr> or <div className="tw:h-px tw:bg-..."> separator, optionally with a centered label<Divider> (orientation, label, labelAlign)

Import from the package root:

import { Box, Card, Divider, Grid } from '@openmetadata/ui-core-components';

Box

Box renders a flex (or inline-flex) div. Layout goes through props, not className:

  • direction: 'row' | 'col' | 'row-reverse' | 'col-reverse' (default row)
  • align: 'start' | 'center' | 'end' | 'stretch' | 'baseline'
  • justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'
  • wrap: 'wrap' | 'nowrap' | 'wrap-reverse'
  • gap / rowGap / colGap: Tailwind spacing scale (0–12, 14, 16...96), not raw px
  • inline: boolean — inline-flex instead of flex

className is still accepted for one-off overrides (margins, borders, backgrounds) — use it for what isn't a layout-direction/gap concern, not to re-add tw:flex.

Real usage, openmetadata-ui/src/main/resources/ui/src/components/DomainListing/DomainListPage.tsx:310-342:

<Box direction="col" style={isTreeView ? { height: 'calc(100vh - 80px)' } : {}}>
  <HeaderBreadcrumb items={[...]} />
  {pageHeader}
  <Card style={{ marginBottom: 20 }} variant="elevated">
    <Box
      className="tw:px-6 tw:py-4 tw:border-b tw:border-secondary"
      direction="col"
      gap={4}>
      <Box align="center" direction="row" gap={5}>
        {titleAndCount}
        {search}
        {!isTreeView && quickFilters}
        <Box className="tw:ml-auto" />
        {viewToggle}
        {deleteIconButton}
      </Box>
      {!isTreeView && filterSelectionDisplay}
    </Box>
    {content}
  </Card>
</Box>

Grid / Grid.Item

24-column grid. Grid takes gap/rowGap/colGap (scale 0–12). Grid.Item takes span (default 24 = full width) and optional start (1-indexed column); both are clamped to the 24-column track.

<Grid gap="4">
  <Grid.Item span={16}>{main}</Grid.Item>
  <Grid.Item span={8}>{sidebar}</Grid.Item>
</Grid>

Card

variant: default | elevated | outlined | ghost. color: default | brand | brandOutlined | error | warning | success. size: sm | md | lg (controls Card.Header/Card.Content/Card.Footer padding). isClickable / isSelected add interactive/selected styling.

<Card isClickable variant="elevated">
  <Card.Header extra={<Button>Edit</Button>} subtitle="Updated 2h ago" title="orders" />
  <Card.Content>{body}</Card.Content>
  <Card.Footer>{footerActions}</Card.Footer>
</Card>

Divider

orientation: horizontal | vertical (default horizontal). label + labelAlign (start | center | end) render a labeled separator instead of a plain line.

<Divider label="or" labelAlign="center" />
<Divider orientation="vertical" />

Color usage

Never write a raw Tailwind palette class (tw:bg-gray-50, tw:text-red-600, tw:border-blue-500, ...) or a hardcoded hex value (style={{ color: '#1570ef' }}). Use the semantic color tokens instead — they remap automatically in dark mode via the .dark-mode class, raw palette classes do not.

REQUIRED REFERENCE: read openmetadata-ui/src/main/resources/ui/docs/colors.md before writing or reviewing any color class — it has the full token table (backgrounds, text, borders, foreground/icon, utility/badge colors) plus a dark-gray-red-green → semantic-token cheat sheet. Highlights:

Raw patternUse instead
tw:bg-white / tw:bg-gray-50tw:bg-primary / tw:bg-secondary
tw:text-gray-900 / tw:text-gray-500tw:text-primary / tw:text-quaternary
tw:border-gray-300tw:border-primary
tw:text-red-600 / tw:border-red-500tw:text-error-primary / tw:border-error
tw:bg-green-50 tw:text-green-700 (badge)tw:bg-utility-success-50 tw:text-utility-success-700
style={{ color: '#1570ef' }}tw:text-fg-brand-primary

Icons use tw:text-fg-* tokens, not tw:text-* — foreground tokens are tuned for icon contrast, text tokens aren't.

Verify

After using these, run the ui-checkstyle skill on the changed files before committing — it lints/formats both openmetadata-ui and openmetadata-ui-core-components trees.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.