Skip to content

laguagu/claude-code-nextjs-skills / skills/nextjs-shadcn

nextjs-shadcn

Verified

Builds distinctive Next.js interfaces with shadcn/ui, choosing typography, styling and purposeful visual effects for the product. Use when creating or polishing a Next.js + shadcn app, page or component, including themes, presets, backgrounds and design-system lint. Uses frontend-design for substantial visual direction, icons for asset sourcing and shadcn for component installation, registries and CLI details.

FileKindSize
SKILL.mdskill md5.9 KB
references/architecture.mdmarkdown3.3 KB
references/project-setup.mdmarkdown2.6 KB
references/shadcn-platform.mdmarkdown3.8 KB
references/sidebar.mdmarkdown2.2 KB
references/styling.mdmarkdown7.9 KB

references/sidebar.md

View on GitHub
# Sidebar integration

Use this when a Next.js app needs shared navigation or a collapsible sidebar. Read `shadcn docs sidebar` with the project's package runner for its actual primitive base and current API.

## Layout ownership

Put `SidebarProvider`, shared navigation and its trigger in the layout that owns the relevant routes. Keep each page's content in `children`. Use `SidebarInset` when the chosen sidebar variant calls for it.

Keep navigation data separate when multiple views use it. Follow the existing aliases and icon family; avoid creating a new global folder structure for one navigation component.

The provider is a Client Component and may wrap Server-rendered content. This is a valid broader client boundary; it does not require every page to become a Client Component.

## Links and state

Base UI composes custom elements through `render`; Radix commonly uses `asChild`. Use the project's installed API rather than mixing the two.

Keep selected state and labels clear. An icon rail needs accessible names and a usable way to expand on touch and keyboard. Use `useSidebar()` for custom triggers and mobile state where appropriate.

With Cache Components, a navigation component that reads `usePathname` for the active link suspends under any route whose dynamic params `generateStaticParams` does not cover, and the build fails without a boundary. Wrap that component in Suspense with a static fallback rather than the whole layout.

To persist open state without a hydration mismatch, read the sidebar cookie in the layout Server Component and pass `defaultOpen` to the provider. Use controlled `open` and `onOpenChange` only when the app needs to own the state.

Choose width, collapse behavior and `sidebar`, `floating` or `inset` variants for the content. A sidebar should give users context without reducing the working area unnecessarily.

## RTL and verification

Use the project's direction support and logical spacing utilities when RTL is relevant. Verify narrow-screen navigation, longest labels, active links, collapsed tooltips, focus and page overflow.

Official APIs: [Base UI sidebar](https://ui.shadcn.com/docs/components/base/sidebar), [Radix sidebar](https://ui.shadcn.com/docs/components/radix/sidebar).
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall