-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Description
Currently Component definitions can include props with a Zod schema and hasChildren for React's children prop. React also supports props named something other than children that, like children, are also of type ReactNode: what other frameworks call slots.
It would be great to be able to define such components in json-render. Perhaps adding a slots key to the Component definition, like:
{
props: z.object({...}), // Zod schema for props
hasChildren?: boolean, // Can it have children?
slots?: [
{name: 'slot1', description: 'Help AI understand when to use it'},
{name: 'slot2', description: 'Help AI understand when to use it'},
],
description?: string, // Help AI understand when to use it
}
Metadata
Metadata
Assignees
Labels
No labels