Interaction Libraries
Interaction libraries are essentially collections of components existing in ProtoPie Cloud for you and team members to use instances of components in prototypes very easily and quickly.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/5c73d2eee43caa6bf79463e130be3aa65e73e5ee-2175x1269.png/interaction-libraries.png)
There are three types of interaction libraries: team, personal, and public libraries.
- Team libraries (Pro plan and Enterprise plan): Any editor in a team can create team libraries and invite other editors to make changes to a team library. Components in team libraries can be used by all editors of a team.
- Personal libraries (all plans): you can create personal libraries in your personal space in the cloud. Only you can use the components in the personal libraries.
- Public libraries (all plans): you can use any components in the public libraries that serve as standard libraries for anyone to use. Examples are Material Design and iOS interaction libraries.
Creating Interaction Libraries
You can create a new interaction library by clicking any of the + buttons on the right side in the Team Library or Personal Library sections in the component panel. After naming the library and adding an optional description, create the library by clicking on the Create button.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/0b6207239d8130795a54bb8ec9ccbc5c1cbbcd4c-1450x800.png/interaction_libraries.png)
Then a new library window will be opened and you will be able to see the current interaction library tagged as Currently Editing in the component panel. The purple banner on top tells you that you are in library edit mode.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/1d70570dda345103bff285308d964c0a1e62632e-1450x800.png/edit_mode.png)
Publishing Interaction Libraries
For you and/or others in your team to use the latest components in your interaction libraries, you would have to publish your changes to the cloud. Save your changes first and then click on the Publish button on the right side of the purple banner or in the top right corner of ProtoPie Studio.
For team libraries, any member of your team who is an editor can use these components in their prototypes.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/a279198dcea1ffdde7515681542b9606a8750ca8-1450x800.png/publish.png)
Adding Component Instances
You can create an instance of a component by dragging a component from any interaction library in the component panel to the canvas of a scene. Also, it's possible to create instances of components from multiple interaction libraries.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/d34c10967aa737c350d472f914aca413d198c73a-1450x800.png/adding_component_instances.png)
Updating Interaction Libraries
If the interaction libraries of which components are being used as instances in your prototypes have been updated, you will see a notification on the Update Library icon. You can choose which interaction libraries to update in the Update Library window. Optionally, you could refresh manually by clicking on the refresh icon in the top right corner to check for new library updates.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/a383cf8bc2d2c4328d829191816f605d45ac1f35-1450x800.png/updating_libraries.png)
Export as New Library
You don't always have to create a library first and then add components. If you have a Pie with local components already, just export it as a new library by clicking on File and then Export as New Library. This way, you can basically put all components that you have in a Pie into a library, all at once.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/892a3df917d68bec80abc9e127993965ec9b1696-1450x800.png/export_as_new_library.png)
Export to Library
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/9bc9da4b105e5e32da4c2aa2a2d3bd7d4319dcc8-1450x800.png/export_to_library_1.png)
Besides exporting local components as a new library, you can export local components in a Pie to an existing library by clicking on the Export to Library icon in the Local Components section.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/f66cbae7091a910ef7ac304babfd2b563c6e93c2-1450x800.png/export_to_library_2.png)
In the Export to Library window, you can select one or multiple components and choose a library to export to. Moreover, you have the option to publish this library right after exporting.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/084e72b68e3e4d4ff6eb374326de6d4057d8858d-1450x800.png/export_to_library_3.png)
Handling Conflicts
Team libraries only.
If someone made changes and published these to the same team library that you are currently editing, you will see a warning message. You can handle conflicts in two ways.
- Overwrite with your own changes and your version will become the latest version.
- Update the library to the new version available while discarding your own changes.
![[object Object]](https://cdn.sanity.io/images/vidqzkll/production/0c03e1a69987075a755823da294947ea3179b18c-1580x870.png/image.png)