diff --git a/modules/paragraphs_library/paragraphs_library.module b/modules/paragraphs_library/paragraphs_library.module
new file mode 100644
index 0000000..f7504e5
--- /dev/null
+++ b/modules/paragraphs_library/paragraphs_library.module
@@ -0,0 +1,85 @@
+<?php
+
+use \Drupal\paragraphs_library\Entity\LibraryItem;
+use \Drupal\Component\Utility\NestedArray;
+use \Drupal\Core\Form\FormStateInterface;
+use \Drupal\paragraphs\ParagraphInterface;
+use \Drupal\Core\Field\WidgetBase;
+
+/**
+ * Implements hook_field_widget_form_alter().
+ */
+function paragraphs_library_field_widget_form_alter(&$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) {
+  $field_definition = $context['items']->getFieldDefinition();
+  if ($target_type = $field_definition->getSetting('target_type')) {
+
+    $paragraph_type = \Drupal::entityTypeManager()->getDefinition($target_type);
+    if ($paragraph_type->isSubclassOf(ParagraphInterface::class)) {
+      $parents = $element['#field_parents'];
+      $field_name = $field_definition->getName();
+      $id_prefix = implode('-', array_merge($parents, array($field_name, $context['delta'])));
+
+      $element['top']['links']['make_library_item'] = [
+        '#type' => 'submit',
+        '#value' => t('Convert to library item'),
+        '#name' => strtr($id_prefix, '-', '_') . '_make_library_item',
+        '#weight' => 503,
+        '#submit' => ['make_library_item_submit'],
+        '#limit_validation_errors' => [array_merge($parents, [$field_name, 'add_more'])],
+        '#delta' => $context['delta'],
+//      '#ajax' => [
+//        'callback' => [get_class($this), 'itemAjax'],
+//        'wrapper' => $widget_state['ajax_wrapper_id'],
+//        'effect' => 'fade',
+//      ],
+//      '#access' => $paragraphs_entity->access('update'),
+        '#prefix' => '<li class="make-library-item">',
+        '#suffix' => '</li>',
+      ];
+    }
+  }
+}
+
+/**
+ * Make library item submit callback.
+ *
+ * @param array $form
+ *   The element form array.
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
+ *   The form state object.
+ */
+function make_library_item_submit(array $form, FormStateInterface $form_state) {
+  $button = $form_state->getTriggeringElement();
+  // Go one level up in the form, to the widgets container.
+  $element = NestedArray::getValue($form, array_slice($button['#array_parents'], 0, -4));
+  $field_name = $element['#field_name'];
+  $parents = $element['#field_parents'];
+
+  // Inserting new element in the array.
+  $widget_state = WidgetBase::getWidgetState($parents, $field_name, $form_state);
+  $delta = $button['#delta'];
+  $widget_state['items_count']++;
+  $widget_state['real_item_count']++;
+  $widget_state['original_deltas'] = array_merge($widget_state['original_deltas'], ['1' => 1]) ;
+
+  // We duplicate the paragraph here so that we get rid of the unique values.
+  if (\Drupal::hasService('replicate.replicator')) {
+    $duplicate_paragraph = \Drupal::getContainer()->get('replicate.replicator')->replicateEntity($widget_state['paragraphs'][$delta]['entity']);
+  }
+  else {
+    $duplicate_paragraph = $widget_state['paragraphs'][$delta]['entity']->createDuplicate();
+  }
+  $library_item = LibraryItem::createFromParagraph($duplicate_paragraph);
+  $library_item->save();
+
+  // Replace this paragraph with the duplicated one.
+  $paragraph[] = [
+    'entity' => $duplicate_paragraph,
+    'display' => $widget_state['paragraphs'][$delta]['display'],
+    'mode' => 'edit'
+  ];
+
+  $widget_state['paragraphs'][$delta] = $paragraph;
+  WidgetBase::setWidgetState($parents, $field_name, $form_state, $widget_state);
+  $form_state->setRebuild();
+}
diff --git a/modules/paragraphs_library/src/Entity/LibraryItem.php b/modules/paragraphs_library/src/Entity/LibraryItem.php
index 0a2e22f..2a935da 100644
--- a/modules/paragraphs_library/src/Entity/LibraryItem.php
+++ b/modules/paragraphs_library/src/Entity/LibraryItem.php
@@ -5,6 +5,7 @@ namespace Drupal\paragraphs_library\Entity;
 use Drupal\Core\Entity\ContentEntityBase;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Field\BaseFieldDefinition;
+use Drupal\paragraphs\ParagraphInterface;
 use Drupal\paragraphs_library\LibraryItemInterface;
 
 /**
@@ -93,4 +94,16 @@ class LibraryItem extends ContentEntityBase implements LibraryItemInterface {
     return $fields;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public static function createFromParagraph(ParagraphInterface $paragraph) {
+    $library_item = static::create([
+      'label' => 'TODO: WHAT TO USE AS TITLE',
+      'paragraphs' => $paragraph,
+    ]);
+
+    return $library_item;
+  }
+
 }
diff --git a/modules/paragraphs_library/src/LibraryItemInterface.php b/modules/paragraphs_library/src/LibraryItemInterface.php
index 97e8277..d72bfcf 100644
--- a/modules/paragraphs_library/src/LibraryItemInterface.php
+++ b/modules/paragraphs_library/src/LibraryItemInterface.php
@@ -3,8 +3,20 @@
 namespace Drupal\paragraphs_library;
 
 use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\paragraphs\ParagraphInterface;
 
 /**
  * Provides an interface defining a paragraphs entity.
  */
-interface LibraryItemInterface extends ContentEntityInterface { }
+interface LibraryItemInterface extends ContentEntityInterface {
+  /**
+   * Creates a library entity from a paragraph entity.
+   *
+   * @param \Drupal\paragraphs\ParagraphInterface $paragraph
+   *   The paragraph entity.
+   *
+   * @return \Drupal\paragraphs_library\LibraryItemInterface
+   *   The library item entity.
+   */
+  public static function createFromParagraph(ParagraphInterface $paragraph);
+}
