ronjunevaldoz/kmp-agent-skills/kmp-shadcn-compose-layouts

Claude Code and agent skill by ronjunevaldoz/kmp-agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Composes shadcn-compose's individual Shadcn* components into full page layouts — login/auth forms, generic data-entry forms, data table screens, and admin/dashboard shells — using recipes verified directly against the library's own real source, not assumed by analogy to real shadcn/ui's React blocks. Also audits an existing screen for underutilized shadcn-compose primitives (hand-rolled form fields instead of ShadcnField, hand-rolled tables instead of ShadcnTable, admin shells missing ShadcnSidebar) and suggests the specific migration. Companion to kmp-shadcn-compose, which stops at individual-component verification and does not cover page-level composition.

Install

npx vskill@latest install ronjunevaldoz/kmp-agent-skills/kmp-shadcn-compose-layouts

SKILL.md

The same SKILL.md was published earlier as ronjunevaldoz/kmp-agent-skills/kmp-shadcn-compose-layouts.

When to Use This Skill

Use when:

  • Building a login/auth form, a generic data-entry form, a data table screen, or an

admin/dashboard shell in a project that already uses shadcn-compose (see kmp-shadcn-compose for adding the dependency and ShadcnTheme first — this skill assumes that's already done).

  • Auditing an existing screen for under-utilizing shadcn-compose — hand-rolled form

fields where ShadcnField/ShadcnFieldGroup would fit, a hand-rolled repeated-Row table where ShadcnTable would fit, or an admin shell with no ShadcnSidebar usage anywhere.

Never for:

  • Individual component signature questions ("what params does ShadcnSelect take?") —

kmp-shadcn-compose's Component Keyword Matrix and fetch_component_signature.py cover that; this skill only composes components already verified there.

  • Translating an HTML/React wireframe into Compose generically —

kmp-layout-system covers that for any component library, not shadcn-compose specifically.

  • Adding shadcn-compose to a project that doesn't have it yet — that's

kmp-shadcn-compose Step 1/2 (or /kmp-migrate-to-shadcn), including the experimental-API risk confirmation. Never skip straight to this skill's recipes without that gate having been cleared first.

Trigger keywords: shadcn login form, shadcn admin layout, shadcn dashboard, shadcn data table, ShadcnField, ShadcnFieldGroup, ShadcnTable, ShadcnSidebar, shadcn compose form, admin shell compose multiplatform, shadcn compose dashboard.

Freshness rule: every signature below was verified directly against shadcn/core/src/commonMain/.../components/{ShadcnField,ShadcnTable,ShadcnSidebar}.kt in the ronjunevaldoz/shadcn-compose repo on 2026-08-04 (library version 0.2.6), not copied from this library's own KDoc examples — kmp-shadcn-compose's Step 4 already found a real case of the library's own KDoc naming composables (ShadcnItemMedia/ShadcnItemContent/ShadcnItemActions) that don't exist anywhere in the repo. Recheck with fetch_component_signature.py before trusting a recipe here against a newer library version.


Recommendation First

Default to the recipes below over hand-rolling a Row/Column layout from scratch once a project has committed to shadcn-compose (see kmp-shadcn-compose's own Recommendation First for that prerequisite decision — this skill doesn't re-litigate it).

Why: real shadcn/ui ships these same four archetypes as its own documented, widely-copied patterns — a Card-wrapped auth form, a Field/FieldGroup-composed settings form, a Table-based data grid, and a Sidebar-based admin shell (shadcn.io/examples's Form, Data Table, Card, and shadcn/ui's own dashboard blocks all demonstrate the same shapes). shadcn-compose's ShadcnField/ShadcnTable/ShadcnSidebar families exist specifically to reproduce these exact archetypes, verified 1:1 against real shadcn's own field.tsx/table.tsx/sidebar.tsx structure per docs/shadcn-parity.md — they are not generic primitives meant to be reassembled ad hoc every time a new screen needs one.


Overview

Produces:

  • Four verified page-composition recipes: login/auth form, generic data-entry form, data

table screen, admin/dashboard shell — each built only from real signatures (no hallucinated parameters, matching kmp-shadcn-compose's own hard rule).

  • scripts/scan_shadcn_layout_gaps.py — audits an existing project for the structural

underutilization patterns a 1:1 component-name scan can't catch (that 1:1 scan already exists — kmp-audit's _detect_raw_component_bypass — this script is deliberately scoped to layout-shape gaps instead, not duplicating it).


Step 1: Login / auth form

Real shadcn's login-01 block shape: a centered, width-capped Card containing a FieldGroup. Every symbol below verified against real source:

kotlin
@OptIn(ExperimentalFoundationStyleApi::class)
@Composable
fun LoginForm(onSubmit: (email: String, password: String) -> Unit) {
var email by remember { mutableStateOf("") }
var password by remember { mutableStateOf("") }
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
ShadcnCard(
modifier = Modifier.widthIn(max = 380.dp),
header = {
ShadcnCardHeader(
title = "Login to your account",
description = "Enter your email below to login to your account",
)
},
) {
ShadcnFieldGroup {
ShadcnField {
ShadcnFieldLabel("Email", required = true)
ShadcnTextField(value = email, onValueChange = { email = it }, placeholder = "m@example.com")
}
ShadcnField {
ShadcnFieldLabel("Password", required = true)
ShadcnTextField(value = password, onValueChange = { password = it })
}
ShadcnButton(
onClick = { onSubmit(email, password) },
modifier = Modifier.fillMaxWidth(),
) { ShadcnText("Login") }
}
}
}
}

Notes on why it's shaped this way:

  • ShadcnFieldGroup's own content lambda is ColumnScope with spacing.xxl between

children — ShadcnFields and the submit ShadcnButton all drop straight in as direct children, no extra Column wrapper needed.

  • ShadcnField's default orientation is Vertical (label stacked above control) — pass

orientation = ShadcnFieldOrientation.Horizontal only for a label-beside-control row (e.g. a settings toggle), not a text-entry field.

  • ShadcnFieldLabel is a thin alias over ShadcnLabel (text, required, disabled) —

it exists so field composition reads consistently, not because it's a different component underneath.

  • ShadcnTextField has no `singleLine`/`isPassword` parameter (verified —

kmp-shadcn-compose already documents the singleLine trap for the general case). There is no dedicated password-masking parameter on it as of 0.2.6 — if the project needs masked input, that's a real gap to flag to the user rather than guess a visualTransformation value works the same as real HTML type="password"; verify against fetch_component_signature.py ShadcnTextField before assuming.


Step 2: Generic data-entry form

Same ShadcnFieldGroup/ShadcnField building blocks, extended with a section separator and mixed control types — real shadcn's field.tsx demo covers exactly this shape:

kotlin
ShadcnFieldGroup {
ShadcnField {
ShadcnFieldLabel("Project name", required = true)
ShadcnTextField(value = name, onValueChange = { name = it })
ShadcnFieldDescription("Shown on the dashboard and in notifications.")
}
ShadcnField {
ShadcnFieldLabel("Visibility")
ShadcnSelect(value = visibility, options = listOf("Private", "Team", "Public"), onValueChange = { visibility = it })
}
ShadcnField(orientation = ShadcnFieldOrientation.Horizontal) {
ShadcnCheckbox(checked = notifyOnChange, onCheckedChange = { notifyOnChange = it })
ShadcnFieldLabel("Notify me on changes")
}
ShadcnFieldSeparator(label = "Advanced")
ShadcnField {
ShadcnFieldLabel("Description")
ShadcnTextarea(value = description, onValueChange = { description = it })
if (descriptionError != null) ShadcnFieldError(descriptionError!!)
}
ShadcnButton(onClick = onSubmit, modifier = Modifier.fillMaxWidth()) { ShadcnText("Save") }
}
  • ShadcnFieldSeparator(label = ...) is the real component for a labeled section divider

between fields in the same group — do not reach for a bare ShadcnSeparator() here, it has no label slot.

  • ShadcnFieldError renders in colors.error — pair it with the field it belongs to,

conditionally, the same way real shadcn's FieldError/FormMessage only renders when a validation message exists. This skill does not cover how to run that validation — see kmp-form-validation for the validation-logic layer; this skill only covers where the resulting message renders.


Step 3: Data table screen

Real shadcn's table.tsx structure — header row with a bottom border, body rows separated by hairlines, left-aligned cells with Modifier.weight for column sizing:

kotlin
ShadcnCard(
header = {
ShadcnCardHeader(
title = "Invoices",
description = "${invoices.size} total",
action = { ShadcnButton(onClick = onCreate) { ShadcnText("New invoice") } },
)
},
) {
ShadcnTable {
ShadcnTableHeaderRow {
ShadcnTableHeadCell("Invoice", Modifier.weight(1f))
ShadcnTableHeadCell("Status", Modifier.weight(1f))
ShadcnTableHeadCell("Amount", Modifier.weight(1f))
}
invoices.forEachIndexed { index, invoice ->
ShadcnTableRow(isLast = index == invoices.lastIndex) {
ShadcnTableCell(invoice.number, Modifier.weight(1f))
ShadcnBadge(modifier = Modifier.weight(1f)) { ShadcnText(invoice.status) }
ShadcnTableCell(invoice.amount, Modifier.weight(1f), muted = true)
}
}
}
}
ShadcnPagination(page = page, pageCount = pageCount, onPageChange = { page = it })

Real, disclosed gap — not a guess to paper over: ShadcnTable is a presentational shell only (matching real shadcn's own bare table.tsx) — it has no built-in sorting, filtering, row selection, or virtualization. Real shadcn/ui's shadcn.io Data Table category is explicitly "TanStack-Table grids with sorting, filtering, pagination, and row selection" — that's a separate pairing (table.tsx + TanStack Table state), not something table.tsx (or ShadcnTable) provides alone. If the screen needs sort/filter/selection, that state must be built by the caller (plain mutableStateOf + sortedBy/filter on the list before rendering rows) — do not assume ShadcnTable has a sortable/onSort parameter without verifying first; as of 0.2.6 it does not.

ShadcnTableHeaderRow/ShadcnTableRow/ShadcnTableCaption are plain top-level composables (not ColumnScope extensions, fixed in the library specifically so they also work inside a LazyGridItemScope item) — safe to call inside a LazyColumn item scope directly if the table needs to be one row of a larger scrollable screen, not only inside ShadcnTable's own Column.


Step 4: Admin / dashboard shell

Two valid, real approaches — both verified against real usage of this exact library, not just its own component signatures:

4a. ShadcnSidebar family (the library's own dedicated components)
kotlin
var sidebarExpanded by remember { mutableStateOf(true) }
ShadcnSidebarProvider(expanded = sidebarExpanded, onExpandedChange = { sidebarExpanded = it }) {
ShadcnSidebar {
ShadcnSidebarHeader { ShadcnText("Acme Inc", style = ShadcnTextStyle.TitleMedium) }
ShadcnSidebarGroup(label = "Platform") {
ShadcnSidebarMenu(
items = listOf(
ShadcnSidebarMenuItem(id = "overview", label = "Overview"),
ShadcnSidebarMenuItem(id = "invoices", label = "Invoices", badge = "3"),
),
activeId = activeId,
onItemClick = { activeId = it },
)
}
ShadcnSidebarFooter { ShadcnText("v1.0.0", muted = true) }
}
ShadcnSidebarInset {
Row(Modifier.fillMaxWidth().padding(shadcnTheme.spacing.sm)) {
ShadcnSidebarTrigger()
}
// page content — dashboard stat cards, a data table (Step 3), etc.
}
}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ronjunevaldoz/kmp-agent-skills/kmp-shadcn-compose-layouts/badge)](https://verified-skill.com/skills/ronjunevaldoz/kmp-agent-skills/kmp-shadcn-compose-layouts)

Something wrong with this skill or its page? Tell us.