Get a component’s source
get_component_sourceRetrieve any encode-ui component's full source or demo code, including all imported files, as readable text.
Instructions
Every TSX file one component ships, or its demo usage example, in fenced code blocks. A multi-file component returns ALL of its files — the public module plus every sibling it imports (.parts.tsx pairs, block modules) — because the entry file alone does not compile. Check sourceBytes/demoBytes on get_component first if size matters. Returns code as text rather than a JSON field, so it stays readable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Component slug, e.g. magnetic-button. A leading scope prefix is accepted and ignored. | |
| part | No | Which payload: the component source, or its demo usage example. | source |