en un clic
create-framework-component
// Create framework components across all supported packages using the repository's anatomy/modules conventions.
// Create framework components across all supported packages using the repository's anatomy/modules conventions.
| name | create-framework-component |
| description | Create framework components across all supported packages using the repository's anatomy/modules conventions. |
Scaffold a new component across all supported framework packages using the existing anatomy/modules authoring style and API conventions.
This repository contains implementations for multiple frameworks. Unless otherwise specified, apply the same patterns, conventions, and API design consistently across all framework packages.
packages/<framework>/src/components/packages/<framework>/test/components/packages/<framework>/src/index.tsUse existing components as implementation references:
Static / non-machine component:
packages/<framework>/src/components/app-bar/index.tsMachine-backed component:
packages/<framework>/src/components/accordion/index.tsAvailable framework package directories include:
packages/skeleton-react/packages/skeleton-svelte/Replace <framework> with the appropriate package when navigating the repository.
Recommend structure based on component complexity, explain the reasoning, and accept overrides.
Create the following in each framework package:
anatomy/*modules/anatomy.tsindex.tsTo view the documentation of a machine: https://zagjs.com/api/mdx/components//
In addition to anatomy files, include provider/context modules as needed:
modules/provider.tsmodules/provider.svelte.tsAlways mirror APIs across frameworks:
Based on the existing app-bar, accordion, and dialog implementations.
app-barAppBarMaintain the anatomy/modules split:
anatomy/*Renderable component parts only.
modules/*Context, providers, namespace composition, machines, and framework glue.
index.tsType exports and namespace exports only.
.tsxindex.ts type exports reference .jsx pathsPropsWithElement + HTMLAttributesmergeProps.svelte<script lang="ts" module>Compose namespaces using:
Object.assign(Root, {
...parts,
});
Inside:
modules/anatomy.tsInclude:
data-scopedata-partattributes on all renderable anatomy parts.
Ask one question at a time. Confirm each step. Do not generate files until all answers are confirmed.
Determine:
Recommend both and accept overrides.
Determine whether the component is:
This determines required module/provider files.
Determine whether to expose:
ProviderContextuseXBefore writing files, show:
Wait for confirmation before scaffolding.
Add component re-exports to:
packages/<framework>/src/index.tsKeep ordering consistent with neighboring entries.
Add tests for every framework package.
packages/<framework>/test/components/<component>.<ext>packages/<framework>/test/components/<component>.test.<ext>For every anatomy part:
toBeInTheDocument)Add the component to each corresponding playground package:
playgrounds/skeleton-<framework>Update generated docs by running:
pnpm generate
inside:
packages/docs
If requested, trigger:
/create-doc
using the new component slug.
Summarize:
Create or update Skeleton React and Svelte playground component pages for a given component, including route generation steps.
Scaffold a new Tailwind utility (CSS-only utility class) in the Skeleton core package, following @utility conventions used by buttons, badges, cards, etc.
Scaffold a new documentation page for the Skeleton documentation site (sites/skeleton.dev), including frontmatter, optional boilerplate, examples, and API reference.
Scaffold an example file (Astro or framework-specific) for a Skeleton documentation page, including the MDX import wiring and Preview/Framework blocks.