Components
API Reference

API Reference

Defines a composable child inside of a Compose component

function Button({ asChild, children, ...props }) {
  const Composition = asChild ? Compose : "button";
  return (
    <Composition {...props}>
      Prefix <Composable>{children}</Composable>
    </Composition>
  );
}

Parameters

props

  • Type: @vtex/shoreline-primitives.ComposableProps

Props

children

  • Type: @types/react.React.ReactNode

render (optional)

  • Type: @vtex/shoreline-utils.RenderProps