Attachments

Enables a user to add, preview, download, or remove attachments from a related record. This component appears in the standard record page's contextual sidebar. 

 

 

Overview

  • Available sinceQuebec
  • A11Y WCAG 2.1 AA

Anatomy

Learn about the individual parts of attachments.

anatomy of full attachment component
  1. Heading: Identifies the set of attachments
  2. Attachment search: Search box to search for attachments based on file name
  3. Attachment card: Includes the attachment thumbnail, file name, metadata, and action menu
  4. Sort: Sorts the attachments alphabetically based on file name
  5. Attachments tab: Displays in the contextual side panel noting attachments to view (full component within contextual side panel only)
  6. Add files button: Uses iconic button for the full size and bare button for the compact size component to add a file
  7. Attachment actions: Displays list of actions that can be performed on the attached file

Usage

Use the attachments component to upload files with the browse file button. The button opens a window for the user to select a local file to add as an attachment. The attachments component supports the following attachment file types: .gif, .png, .bmp, .pdf, .ppt, .doc, .xls, and .txt. An admin can set the supported file types. When configured, users can create or delete documents in the document repository.

You can place the full component in a contextual side panel on a page or as a related item, where the attachments are associated with specific records.

recommended component positioning

In this example, the attachment component is configured in the contextual side panel.

Variants

Learn about the attachments component and find out how to use it in your design.

Types

The attachments component comes in full and compact versions. The full version is often seen with a contextual side panel, while the compact version is often placed inside a card or modal.

attachment in related list view

In this example, attachment component is configured in the contextual side panel.

attachment card view

In this example, the custom attachment component (compact) is placed in a modal

Sizes

The full and compact component versions expand and contract to fit the container.

Full

related item attachment component tile max width

In this example, the attachment component appears in default size

Compact

related item attachment component tile max width

In this example, attachment component appears in compact size and spacing

Configurations

An admin can configure the attachments presence to display or not as needed for certain users.

Presets and controllers

This component contains a preset configuration that automatically configures properties and event handlers for a component, making the component ready to work when you add it to a page. A preset is designed to suit a specific use case. However, you can override preset property values with a custom configuration if you find it necessary for your design. Preset values that you override aren’t upgraded when updates are available. If you don’t want to use the preset values provided, select the option to configure the component manually. You can apply one preset to a single instance of a component on a page. For more information, see Presets.

A preset is always associated with a controller, which acts as a data resource for the component. Controllers provide the configuration data and event bindings the component needs to function in your experience. By selecting a preset, the required controller is added to the page. By adding a controller to the page, any new applicable components will have that controller's preset. For more information about how controllers work, see Controllers. For instructions on using the data inspector to view the default presets for a component, see View properties and events in the Controller API.

Document management

You can configure attachments to enable users to create and delete documents in the document repository using the Document Management application. You can also define the maximum size for files that users are allowed to create. The properties that enable this feature and limit document size are not part of the preset for this component. This capability requires activation of the Document Management plugin on the instance. For instructions on activating the plugin, see Activate Document Management.

File size

You can define the maximum size of a file that a user can attach to a record.

Design recommendations

Learn how to apply attachments in your design.

full-size component as a related item
Do

Put a full attachment component inside the contextual side panel

full-size attachment component in card view
Don’t

Don't put attachment full component into containers other than contextual side panel

attachment card view
Do

Put a compact component into a small container like a modal or play book card, because it's designed to fit a small space for optimal usage.

compact view in contextual side panel
Don’t

Don't put a custom attachment component (compact) into a large container like contextual side panel, because valuable 
options like search functionality may be lost.

UI text guidelines

These are some recommendations for using text with attachments.

  • Use sentence case for all titles, labels, and column headers
  • Keep all text labels short and informative to increase readability and scanning
  • Keep content concise and purposeful to provide value to the user
  • Capitalize only the first letter and any proper nouns in a string of text
  • Ensure content is contextual and specific to offer guidance and support to the user

Behavior

Learn how the attachments component behaves when the display changes or a user interacts with the component.

States

The attachments component has the following states: empty and attachment card hover.

Empty

Shows the attachment component empty state

Empty state

Attachment card hover

Shows the attachment hover state

Attachment card hover

Responsive behaviors

Full or compact attachment cards, adjust to the container size. The cards expand with the container size until the maximum card size is reached and then they transition into a multi-column view. For example, the full component can appear within the contextual side panel. The attachment cards shift sizes within their breakpoints to conform to the size of the container.

side panel attachment component expansion

In this example, attachment cards expand with the container size until the maximum card size is reached

related item attachment component full

In this example, the full component is in a multi-column view (2 columns)

related item attachment component tile max width

In this example, the full component is in a multi-column view (3 columns)

Interactions

The attachments component allows users to drag and drop files for upload, interact with the attachment actions menu, upload using a button, and search through attachments (full component only).

attachments tile menu

In this example, attachment card menu is configured with options

Drag and drop

When there is a full component present in the contextual side panel or as a related item, the user can select one or multiple attachments to drag and drop anywhere into the window for upload.

drag and drop attachments

In this example, the drag and drop function is shown in progress.

Rename

The user renames an attached file by selecting the Attachment actions icon, selecting Rename, and then editing the file name.

drag and drop attachments

In this example, a rename attachment is shown in progress.

Attachment card

Includes the attachment thumbnail (or NDS default thumbnail for that file type, if a thumbnail from the attachment is not available), file name, metadata, and action menu.

Users are granted access to different edit features in the attachment actions menu. Full editing access offers rename, download, and remove actions. Restricted editing will not see these options in the attachment actions menu. If the end user doesn't have access to any of the editing features, the actions menu will not appear in the attachment card. Files appear in the order uploaded.

Search field

Lets users look for attachments by file names associated with records, playbook steps, and emails (full-size component only).

Browse button

Uses iconic button for the full size and bare button for the compact size component to bring up a system browser window that lets the user select a local file to add as an attachment.

Truncation

When text in the attachments component exceeds the width of the container or content area, the text truncates with an ellipsis, and a tooltip shows the full content on hover.

attachment tile truncation

In this example, truncated text includes a tooltip display.

Usability

The attachments component complies with all internationalization and accessibility requirements.

Internationalization

When the display translates to a right-to-left (RTL) language, the component content flows from right to left, maintaining the hierarchy.

attachments RTL content

Accessibility

Learn how to access the actionable elements of attachments through keyboard interactions.

Keyboard interactions

You can access the actionable elements of the attachments component with these keyboard keys:

  • Tab: Shifts focus to attachment card and attachment actions menus, starting at the top and moving down the list of cards in chronological order, based on the attachment upload. The focus will move from the attachment card and then to the attachment actions menu. Content of the attachment card does not shift when in focus (e.g., truncated text does not expand when the card is in focus).
  • Shift+Tab: Moves focus in the opposite direction of the tabbing focus (e.g., focus moves from an attachment actions menu to the associated card and then to the attachment actions menu from the card above it).
  • Enter/Space: Opens the attachment for the card currently in focus in a full screen preview as well as opening the attachment actions menu and executing the actions.
  • Up/Down arrows: When focus is inside the attachment actions menu, the up and down arrow keys are used to move between the menu options.

Tab order

anatomy of full attachment component