Share

<Share />

Overview

The <Share /> can be used to allow the user to share their product's configuration through a URL link.

The Share widget renders out a single button. When the button is clicked, a URL to resume the current configuration is copied to the user's clipboard and a message is shown saying the configuration have been copied.

The user can paste this URL wherever they would like to share it.

Code Examples

import { ThreekitProvider, Player, Share } from '@threekit-tools/treble';

const Component = () => {
  return (
    <ThreekitProvider>
      <Player>
        <Player.TopRightWidgets>
          <Share />
        </Player.TopRightWidgets>
      </Player>
    </ThreekitProvider>
  );
};

Props

PropertyDescriptionTypeDefault
messageUsed to set an overwrite of the message presented to the user when the share URL has been successfully copied.stringLink copied
orientationSets whether to align the buttons horizontally or verticallyvertical | horizontalhorizontal
shapeSets the shape of the button.round | squareround
typeSets the type of button.hollow | standard | accent | primary | threekitthreekit
classNameA className to the widget container.string''