Document Preview

Renders a document_preview component

sample.pdf

May 13, 2023 • 0.08MB

Download
Download
Attribute Type Documentation Default Value
Required id * :string

ID of the document preview modal

class :any

Additional classes to add to the parent.

[]
active_document_id :any

Active document to display

active_document_size :any

Active document size

show :boolean

Whether the document preview modal is visible

false
file_info_prefix :string

Optional fallback text shown before the uploaded date when the active document does not define its own file_info_prefix

previous_navigation_text :string

Text shown for the previous navigation button

"Previous document"
next_navigation_text :string

Text shown for the next navigation button

"Next document"
allow_document_cycling :boolean

Whether users can move between documents. When false, previous/next buttons are hidden and document cycling is disabled

true
param_name_to_add_in_url :string

Param name to add in the URL when showing the preview.

Read more Read less

If nil, no param is added. If set then id_for_url attr must be present in each document

rest :global
document :slot

Documents to display in the preview. Each document may optionally define file_info_prefix, action_info_icon, action_info_text, custom_action_icon, custom_action_label, and custom_action_on_click for document-specific behavior

Show slot attributes Hide slot attributes
Required id * :any
id_for_url :string
Required name * :string
Required uploaded_date * :string
external_link :string
file_info_prefix :string
action_info_icon :string
action_info_text :string
custom_action_icon :string
custom_action_label :string
custom_action_on_click :any
Required generate_preview_url * :any
Required generate_download_url * :any