Components
API Reference

API Reference

Composes immediate child with its props and child own props. Used to implement Shoreline composition

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

Parameters

props

  • Type: @vtex/shoreline-primitives.ComposeProps & @types/react.React.RefAttributes<any>

Props

children (optional)

  • Type: @types/react.React.ReactNode