build-app-layout
БесплатноБез исполняемых скриптовНе проверенUse this skill for any task involving app layouts — building new layouts, adding sidebars or navigation to existing apps, migrating an existing layout to…
от siriwatknp★ 2 442 звезды на GitHubОб этом скилле
Installation
Components are installed via the mui-treasury CLI into src/mui-treasury/:
# Layout core (Root, Header, Content, Footer, EdgeSidebar, InsetSidebar, etc.)
npx mui-treasury@latest add layout-core
# Sidebar primitives (SidebarContainer, SidebarMenuButton, SidebarIcon, etc.)
npx mui-treasury@latest add sidebar
After installation, import from:
@/mui-treasury/layout/layout-core— layout components@/mui-treasury/components/sidebar— sidebar primitives
Recommended Defaults
Use these as starting values unless the user specifies otherwise.
Collapsible EdgeSidebar
collapsedWidth: "52px"SidebarIcon shrinkSize="20px"to center icons in the collapsed sidebarpermanentAutoCollapse="lg"to auto-collapse below thelgbreakpoint<EdgeSidebarCollapser render={<SidebarRail />} />as a click-to-collapse trigger —SidebarRailis a pure visual component,EdgeSidebarCollapserinjects the collapse onClick- Use sidebar primitives for sidebar content — they auto-adapt to collapsed state
- left/right arrow icons for
EdgeSidebarCollapser - down arrow icon for
CollapsibleIcon
EdgeSidebar Content Structure
Place SidebarContainer in the middle of EdgeSidebarContent so it grows to fill available space and becomes the scrollable area for menus. Static-height content (sidebar header/footer) should be siblings of SidebarContainer:
EdgeSidebarContent
├── Sidebar header (static) — e.g. app switcher, logged-in user, logo
├── SidebarContainer (flex: 1, scrollable) — navigation menus
└── Sidebar footer (static) — e.g. user preferences, settings, ads/banner
EdgeSidebarContentusesdisplay: flex; flex-direction: columnby defaultSidebarContainergrows viaflex: 1and handles its own overflow scroll- Sidebar header/footer keep their natural height and never scroll
- Sidebar primitives (
SidebarMenuButton,SidebarIcon, etc.) still work in the header/footer areas because they are descendants ofEdgeSidebar— but collapse-aware CSS variables (--_collapsed/--_uncollapsed) only work insideSidebarContainer
SidebarMenuButton
should use the
componentprop for polymorphism, e.g.<SidebarMenuButton component="a" href="/dashboard">or<SidebarMenuButton component={Link} to="/dashboard">MUST be a child of
SidebarMenuItemwhich is a child ofSidebarMenuList. Never wrapSidebarMenuButtonin a plaindivorBox— the list structure (SidebarMenuList > SidebarMenuItem > SidebarMenuButton) is required for proper spacing, collapse behavior, and accessibilityNever use consecutive
SidebarTextsiblings inside aSidebarMenuButton. For multi-line text, use a singleSidebarTextwrapping the content. For two-line text labels, useSidebarGroupText:// ❌ Wrong — consecutive SidebarText <SidebarMenuButton> <Avatar /> <SidebarText><Typography>siriwatknp</Typography></SidebarText> <SidebarText><Typography>[email protected]</Typography></SidebarText> </SidebarMenuButton> // ✅ Correct — single SidebarText with SidebarGroupText for 2 lines <SidebarMenuButton> <Avatar /> <SidebarText> <SidebarGroupText> <Typography variant="body2">siriwatknp</Typography> <Typography variant="caption">[email protected]</Typography> </SidebarGroupText> </SidebarText> </SidebarMenuButton>Never place secondary actions (e.g.
IconButton,Badge) insideSidebarMenuButton. UseSidebarMenuActionas a sibling:// ❌ Wrong — actions inside SidebarMenuButton <SidebarMenuItem> <SidebarMenuButton> <Avatar /> <SidebarText>siriwatknp</SidebarText> <Box sx={{ display: "flex", gap: 0.5 }}> <IconButton size="small"><MoreHorizRounded /></IconButton> <IconButton size="small"><NotificationsRounded /></IconButton> </Box> </SidebarMenuButton> </SidebarMenuItem> // ✅ Correct — SidebarMenuAction as sibling <SidebarMenuItem> <SidebarMenuButton> <Avatar /> <SidebarText>siriwatknp</SidebarText> </SidebarMenuButton> <SidebarMenuAction> <IconButton size="small"><MoreHorizRounded /></IconButton> <IconButton size="small"><NotificationsRounded /></IconButton> </SidebarMenuAction> </SidebarMenuItem>Never make
SidebarMenuButtonnon-interactive (e.g.component="div"withcursor: "default"). If the element is not clickable, useSidebarMenuItemdirectly instead:// ❌ Wrong — non-interactive button <SidebarMenuButton component="div" sx={{ cursor: "default", "&:hover": { bgcolor: "transparent" } }}> <Avatar /> <SidebarText>siriwatknp</SidebarText> </SidebarMenuButton> // ✅ Correct — use SidebarMenuItem for non-interactive content <SidebarMenuItem> <Avatar /> <SidebarText>siriwatknp</SidebarText> </SidebarMenuItem>SidebarMenuActionmust only be used alongside aSidebarMenuButtonsibling. If there is no `SidebarMe
Установить build-app-layout в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл build-app-layout?
Use this skill for any task involving app layouts — building new layouts, adding sidebars or navigation to existing apps, migrating an existing layout to mui-treasury components, or reviewing/improving layout structure. Trigger whenever the user mentions dashboard layout, sidebar navigation, app shell, header/footer/content structure, collapsible sidebar, drawer navigation, layout with sidebar, or asks to "build a layout", "add a sidebar", "set up the app layout", "review the layout". Also trigger when a mockup or design shows an app with sidebar + header + content regions, even if the user doesn't say "layout" explicitly.
Как установить скилл build-app-layout?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл build-app-layout запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic