ui-patterns
Skill17 starsChanged 9 months agoMITView on GitHub
Dashboard UI templates for page layouts, loading states, error states, and sheet scroll patterns. Use when creating admin dashboard pages or need consistent layout patterns.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- lubusIN/frappe-skillstheir own version, first seen Nov 4, 2026
- poooi/poitheir own version, first seen Oct 8, 2026
- Iteam-company/claude-code-boilerplatestheir own version, first seen May 19, 2026
- LWaetzig/claude-code-skillstheir own version, first seen Apr 10, 2026
- patrickserrano/skillstheir own version, first seen Jan 17, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- poooi/poi★ 1.8ksame name
- lubusIN/frappe-skills★ 68same name
- patrickserrano/skills★ 13same name
- Iteam-company/claude-code-boilerplates★ 2same name
- LWaetzig/claude-code-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- commitSkill
- create-branchSkill
- create-prSkill
- create-skillSkill
- fix-ciSkill
- gh-issueSkill
- merge-to-stagingSkill
- review-pr-commentsSkill
- slack-pr-recapSkill
- start-working-on-issueSkill
- test-coverage-improveSkill
- testing-guideSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Import from @/lib/utils/constants.
- Very specific: line 27
How to decide: If the page uses <PageFooter>, use WITH_FOOTER.
- Very specific: line 62
Use InfoPanel centered with appropriate height class.
- Distinctive: line 128
When applying these patterns, explore the codebase for existing implementations:
- Very specific: line 130
Search for existing loading states: Glob("src/app//loading.tsx")
- Very specific: line 131
Search for existing error states: Glob("src/app//error.tsx")
- Very specific: line 132
Search for sheet patterns: Grep("SheetContent", glob="src/components//*.tsx")
- Very specific: line 133
Search for PAGE_HEIGHT_CLASS usage: Grep("PAGE_HEIGHT_CLASS", glob="src//*.tsx")
- Distinctive: line 135
Use these real implementations as reference alongside the templates above.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dashboard UI Patterns
Reference templates for building and modifying dashboard pages. Use this when creating new pages, loading states, error states, or sheet/sidebar components.
Page Height Constants
Import from @/lib/utils/constants. These ensure consistent full-viewport layouts across all dashboard pages.
import { PAGE_HEIGHT_CLASS } from "@/lib/utils/constants";| Constant | Value | Use When |
PAGE_HEIGHT_CLASS.WITH_FOOTER | "h-[calc(100dvh-176px)]" | Pages WITH footer (customers, FAQs, services, conversations) |
PAGE_HEIGHT_CLASS.WITHOUT_FOOTER | "h-[calc(100dvh-112px)]" | Pages WITHOUT footer (calendar, schedule, settings, pricing) |
PAGE_HEIGHT_CLASS.MAX_WITH_FOOTER | "max-h-[calc(100dvh-176px)]" | Scrollable cards/containers on pages with footer |
How to decide: If the page uses <PageFooter>, use WITH_FOOTER. Otherwise use WITHOUT_FOOTER.
Loading State Templates
Page WITH footer
// loading.tsx
<PageContent withFooter>
<Loader
className={PAGE_HEIGHT_CLASS.WITH_FOOTER}
message={t("loading")}
/>
</PageContent>
<PageFooter> </PageFooter>Page WITHOUT footer
// loading.tsx
<PageContent>
<Loader
className={PAGE_HEIGHT_CLASS.WITHOUT_FOOTER}
message={t("loading")}
/>
</PageContent>Error State Templates
Use InfoPanel centered with appropriate height class.
// error.tsx pattern
<PageContent
className={cn(
PAGE_HEIGHT_CLASS.WITHOUT_FOOTER,
"flex items-center justify-center"
)}
>
<InfoPanel
title={t("error.loadError")}
description={error.message || t("error.unexpectedError")}
icon={<WarningIcon size={40} />}
iconColor="text-destructive"
>
<Button onClick={reset}>{t("error.tryAgain")}</Button>
</InfoPanel>
</PageContent>InfoPanel children layout: Children render inline with centered buttons. Multiple buttons appear side-by-side.
<InfoPanel title="..." description="...">
<Button>Action 1</Button>
<Button>Action 2</Button>
</InfoPanel>Sheet / Sidebar Scroll Pattern
For sheets with scrollable content, use this flex layout recipe:
<SheetContent
side="right"
className="flex w-full max-h-[100dvh] flex-col gap-0 overflow-hidden sm:max-w-md"
>
<SheetHeader className="shrink-0 border-b border-border">
{/* Header content */}
</SheetHeader>
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
<div className="shrink-0 px-6 py-4 border-b">
{/* Fixed content (filters, tabs, etc.) */}
</div>
<div ref={scrollRef} className="flex-1 overflow-y-auto px-6 py-4">
{/* Scrollable content */}
</div>
</div>
</SheetContent>Key principles:
max-h-[100dvh]andoverflow-hiddenonSheetContentshrink-0on fixed elements (headers, footers)min-h-0 flex-1 overflow-hiddenon the scrollable wrapperflex-1 overflow-y-autoon the actual scrollable area
Workflow: Finding Real Examples
When applying these patterns, explore the codebase for existing implementations:
- Search for existing loading states:
Glob("src/app/**/loading.tsx") - Search for existing error states:
Glob("src/app/**/error.tsx") - Search for sheet patterns:
Grep("SheetContent", glob="src/components/**/*.tsx") - Search for PAGE_HEIGHT_CLASS usage:
Grep("PAGE_HEIGHT_CLASS", glob="src/**/*.tsx")
Use these real implementations as reference alongside the templates above.
Icons
Always use Phosphor Icons. lucide-react is banned via linting.
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
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.

