{"componentChunkName":"component---src-pages-patterns-common-actions-index-mdx","path":"/patterns/common-actions/","result":{"pageContext":{"frontmatter":{"title":"Common actions","description":"Common actions are frequently used actions that appear across different components and workflows."},"relativePagePath":"/patterns/common-actions/index.mdx","titleType":"prepend","MdxNode":{"id":"bd36fff4-7f4d-5aba-a360-699da0b2b06c","children":[],"parent":"cce5db11-a5b3-58c3-819e-b48fd16db696","internal":{"content":"---\ntitle: Common actions\ndescription: Common actions are frequently used actions that appear across different components and workflows.\n---\n\n<PageDescription>\n\nCommon actions frequently appear across different components and workflows. For platform consistency, these actions should only be applied in the ways described below.\n\n</PageDescription>\n\n<AnchorLinks>\n\n<AnchorLink>Add</AnchorLink>\n<AnchorLink>Cancel</AnchorLink>\n<AnchorLink>Clear</AnchorLink>\n<AnchorLink>Close</AnchorLink>\n<AnchorLink>Copy</AnchorLink>\n<AnchorLink>Delete</AnchorLink>\n<AnchorLink>Edit</AnchorLink>\n<AnchorLink>Errors</AnchorLink>\n<AnchorLink>Next</AnchorLink>\n<AnchorLink>Refresh</AnchorLink>\n<AnchorLink>Remove</AnchorLink>\n<AnchorLink>Reset</AnchorLink>\n\n</AnchorLinks>\n\n## Add\n\nAdd inserts an existing object to a list, set, or system. For example, adding a document to a folder.\n\n<Row>\n<Column colLg={8}>\n\n![Example of add as a button with an icon in a data table](images/common-action-7.png)\n\n</Column>\n</Row>\n\n### Hierarchy and placement\n\nDepending on the importance of the add action on the page, the emphasis can be high, medium, or low. For example, a high emphasis action should use a single primary button with all others being secondary.\n\n### Considerations\n\nSmall adjustments in your messaging will reduce user uncertainty. Consider the following:\n\n- What are the implications of the add action for the user? Are there financial, access, or legal considerations?\n- Does the user have the correct permissions for this action?\n- Is the action permanent?\n- What timeframe will the action take (seconds, minutes, hours, days)?\n- What should a user do if the action fails?\n- Is this a single or bulk action?\n\n## Cancel\n\nCancel stops the current action and closes the component or item. Warn the user of any negative consequences if the process doesn't progress, such as data corruption or data loss.\n\nUse a secondary button or a link for cancel actions.\n\n<Row>\n<Column colLg={8}>\n\n![Example of cancel in a modal](images/common-action-1.png)\n\n</Column>\n</Row>\n\n## Clear\n\nClear removes data from a field or removes selections. Clear can also delete the contents of a document, such as a log. For controls that have a default selection or value, such as radio buttons, the default selection or value is reset.\n\nUse the `close` icon on the right side of a field, item, or value.\n\n<Row>\n<Column colLg={8}>\n\n![Example of clear in multi-select dropdown and in a search field](images/common-action-2.png)\n\n</Column>\n</Row>\n\n## Close\n\nClose terminates the current page, window, or menu. Close is also used to dismiss information, such as notifications.\n\nUse the `close` icon, which is typically placed on the upper right side of the element. Do not use close in a button.\n\n<Row>\n<Column colLg={8}>\n\n![Example of close in an toast notification](images/common-action-3.png)\n\n</Column>\n</Row>\n\n## Copy\n\nCopy creates a new identical instance of the selected object(s).\n\nUse the `copy` icon with a confirmation \"copied\" tooltip appearing post-click or tap.\n\n<Row>\n<Column colLg={8}>\n\n![Example of copy in a code snippet](images/common-action-8.png)\n\n</Column>\n</Row>\n\n## Delete\n\nDelete destroys an object. Delete actions cannot be easily undone and are typically permanent. Warn the user of any negative consequences if an object is destroyed, such as loss of data. Use either the `delete` or `trash can` icon, a danger button, or a danger option in a menu. A danger modal is used when a warning is needed to confirm an action.\n\n<Row>\n<Column colLg={8}>\n\n![Example of delete in a modal and overflow menu](images/common-action-4.png)\n\n</Column>\n</Row>\n\n### Low-impact deletion\n\nUse when it's trivial to undo deletion or recreate the data. Delete the data upon click or tap without further warning.\n\n### Moderate-impact deletion\n\nUse when an action cannot be undone or the data cannot be recreated easily. This pattern is also useful if you're deleting more than one thing.\n\nAsk for confirmation of the delete, with guidance about what will occur if they delete.\n\n### High-impact deletion\n\nUse when it would be very expensive or time-consuming to recreate data. Also use if the action deletes a large amount of data, or if other important items would be deleted as a result of the action.\n\nIn addition to presenting a dialog, have the user type the name of the resource they are deleting (manual confirmation).\n\n### Post-deletion\n\nAfter the user deletes data, return to the page that lists the data deleted. Animate the removal of the data from the list or page and present a success notification.\n\nIf the deletion fails, raise a notification to tell the user that deletion failed. Send a second notification on another communication channel, like email, if possible. Animate the data back onto the page if possible.\n\n## Edit\n\nEdit allows data or values to be changed. Edit commonly triggers a state change to the targeted object or input item.\n\nOffer edit as an option in a menu, or as a button or `edit` icon.\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in a data table cell](images/common-action-9.png)\n\n</Column>\n</Row>\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in an overflow menu](images/common-action-10.png)\n\n</Column>\n</Row>\n\n## Errors\n\nErrors occur when an action or process does not succeed. Error notifications can occupy full pages, form fields, notifications, and modals. Error notifications should provide context of what happened and a clear path to continue.\n\n<Row>\n<Column colLg={8}>\n\n![Form example with inline notification](images/notification-usage-3.png)\n\n</Column>\n</Row>\n\nConsider redirecting the user to a previous state, a support page, or offering recommendations. Be honest and helpful.\n\nSome components, like text input and form field errors, are quite small and require more thoughtful approaches to the space and placement of error handling. Consider inline error notifications for these instances.\n\n### Content guidelines\n\nBe brief, honest, and supportive. Explain what happened and what can the user do to resolve the error.\n\nFor full-page and large modals, keep error messages no longer than three paragraph lines. For form errors, keep error messages no longer than two lines.\n\n## Next\n\nNext advances the user to the next step in a sequence of steps, like in a wizard.\n\nRepresent next with a [button with icon](/components/button/usage) or a standalone `forward` icon.\n\n<Row>\n<Column colLg={8}>\n\n![Example of next as a button with icon](images/common-action-11.png)\n\n</Column>\n</Row>\n\n## Refresh\n\nThis action reloads the view of an object, list, or data set when the displayed view has become unsynchronized with the source.\n\nUse the `refresh` icon or a button.\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in a data table cell](images/common-action-12.png)\n\n</Column>\n</Row>\n\n## Remove\n\nThis action removes an object from a list or item. Remove is distinct from delete, as a removed item is not destroyed. Multiple objects can be removed at once.\n\n<Row>\n<Column colLg={8}>\n\n![Example of remove in a structured list](images/common-action-5.png)\n\n</Column>\n</Row>\n\n### Hierarchy and placement\n\nRepresent remove as a button or `subtract` icon or glyph. The remove action is rarely the primary action on the page and should not be overly emphasized.\n\n### Considerations\n\n- What are the implications of the remove action for the user? Are there financial, access, or legal considerations?\n- This action can be confused with deleting.\n- A user may not have the correct permissions for this action.\n- Inform the user if the result is permanent.\n- How long will the action take? Seconds, minutes, hours, or days?\n- What should the user do if the removal fails?\n- Is this a single or bulk action?\n\n## Reset\n\nReset reverts values back to their last saved state. The last saved state includes the values stored the last time the user clicked or triggered **Apply**.\n\n<Row>\n<Column colLg={8}>\n\nReset is typically applied as a link.\n\n![Example of reset in a filter](images/common-action-6.png)\n\n</Column>\n</Row>\n","type":"Mdx","contentDigest":"476ab90d03456e66897e5e3ef2d4effc","counter":1676,"owner":"gatsby-plugin-mdx"},"frontmatter":{"title":"Common actions","description":"Common actions are frequently used actions that appear across different components and workflows."},"exports":{},"rawBody":"---\ntitle: Common actions\ndescription: Common actions are frequently used actions that appear across different components and workflows.\n---\n\n<PageDescription>\n\nCommon actions frequently appear across different components and workflows. For platform consistency, these actions should only be applied in the ways described below.\n\n</PageDescription>\n\n<AnchorLinks>\n\n<AnchorLink>Add</AnchorLink>\n<AnchorLink>Cancel</AnchorLink>\n<AnchorLink>Clear</AnchorLink>\n<AnchorLink>Close</AnchorLink>\n<AnchorLink>Copy</AnchorLink>\n<AnchorLink>Delete</AnchorLink>\n<AnchorLink>Edit</AnchorLink>\n<AnchorLink>Errors</AnchorLink>\n<AnchorLink>Next</AnchorLink>\n<AnchorLink>Refresh</AnchorLink>\n<AnchorLink>Remove</AnchorLink>\n<AnchorLink>Reset</AnchorLink>\n\n</AnchorLinks>\n\n## Add\n\nAdd inserts an existing object to a list, set, or system. For example, adding a document to a folder.\n\n<Row>\n<Column colLg={8}>\n\n![Example of add as a button with an icon in a data table](images/common-action-7.png)\n\n</Column>\n</Row>\n\n### Hierarchy and placement\n\nDepending on the importance of the add action on the page, the emphasis can be high, medium, or low. For example, a high emphasis action should use a single primary button with all others being secondary.\n\n### Considerations\n\nSmall adjustments in your messaging will reduce user uncertainty. Consider the following:\n\n- What are the implications of the add action for the user? Are there financial, access, or legal considerations?\n- Does the user have the correct permissions for this action?\n- Is the action permanent?\n- What timeframe will the action take (seconds, minutes, hours, days)?\n- What should a user do if the action fails?\n- Is this a single or bulk action?\n\n## Cancel\n\nCancel stops the current action and closes the component or item. Warn the user of any negative consequences if the process doesn't progress, such as data corruption or data loss.\n\nUse a secondary button or a link for cancel actions.\n\n<Row>\n<Column colLg={8}>\n\n![Example of cancel in a modal](images/common-action-1.png)\n\n</Column>\n</Row>\n\n## Clear\n\nClear removes data from a field or removes selections. Clear can also delete the contents of a document, such as a log. For controls that have a default selection or value, such as radio buttons, the default selection or value is reset.\n\nUse the `close` icon on the right side of a field, item, or value.\n\n<Row>\n<Column colLg={8}>\n\n![Example of clear in multi-select dropdown and in a search field](images/common-action-2.png)\n\n</Column>\n</Row>\n\n## Close\n\nClose terminates the current page, window, or menu. Close is also used to dismiss information, such as notifications.\n\nUse the `close` icon, which is typically placed on the upper right side of the element. Do not use close in a button.\n\n<Row>\n<Column colLg={8}>\n\n![Example of close in an toast notification](images/common-action-3.png)\n\n</Column>\n</Row>\n\n## Copy\n\nCopy creates a new identical instance of the selected object(s).\n\nUse the `copy` icon with a confirmation \"copied\" tooltip appearing post-click or tap.\n\n<Row>\n<Column colLg={8}>\n\n![Example of copy in a code snippet](images/common-action-8.png)\n\n</Column>\n</Row>\n\n## Delete\n\nDelete destroys an object. Delete actions cannot be easily undone and are typically permanent. Warn the user of any negative consequences if an object is destroyed, such as loss of data. Use either the `delete` or `trash can` icon, a danger button, or a danger option in a menu. A danger modal is used when a warning is needed to confirm an action.\n\n<Row>\n<Column colLg={8}>\n\n![Example of delete in a modal and overflow menu](images/common-action-4.png)\n\n</Column>\n</Row>\n\n### Low-impact deletion\n\nUse when it's trivial to undo deletion or recreate the data. Delete the data upon click or tap without further warning.\n\n### Moderate-impact deletion\n\nUse when an action cannot be undone or the data cannot be recreated easily. This pattern is also useful if you're deleting more than one thing.\n\nAsk for confirmation of the delete, with guidance about what will occur if they delete.\n\n### High-impact deletion\n\nUse when it would be very expensive or time-consuming to recreate data. Also use if the action deletes a large amount of data, or if other important items would be deleted as a result of the action.\n\nIn addition to presenting a dialog, have the user type the name of the resource they are deleting (manual confirmation).\n\n### Post-deletion\n\nAfter the user deletes data, return to the page that lists the data deleted. Animate the removal of the data from the list or page and present a success notification.\n\nIf the deletion fails, raise a notification to tell the user that deletion failed. Send a second notification on another communication channel, like email, if possible. Animate the data back onto the page if possible.\n\n## Edit\n\nEdit allows data or values to be changed. Edit commonly triggers a state change to the targeted object or input item.\n\nOffer edit as an option in a menu, or as a button or `edit` icon.\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in a data table cell](images/common-action-9.png)\n\n</Column>\n</Row>\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in an overflow menu](images/common-action-10.png)\n\n</Column>\n</Row>\n\n## Errors\n\nErrors occur when an action or process does not succeed. Error notifications can occupy full pages, form fields, notifications, and modals. Error notifications should provide context of what happened and a clear path to continue.\n\n<Row>\n<Column colLg={8}>\n\n![Form example with inline notification](images/notification-usage-3.png)\n\n</Column>\n</Row>\n\nConsider redirecting the user to a previous state, a support page, or offering recommendations. Be honest and helpful.\n\nSome components, like text input and form field errors, are quite small and require more thoughtful approaches to the space and placement of error handling. Consider inline error notifications for these instances.\n\n### Content guidelines\n\nBe brief, honest, and supportive. Explain what happened and what can the user do to resolve the error.\n\nFor full-page and large modals, keep error messages no longer than three paragraph lines. For form errors, keep error messages no longer than two lines.\n\n## Next\n\nNext advances the user to the next step in a sequence of steps, like in a wizard.\n\nRepresent next with a [button with icon](/components/button/usage) or a standalone `forward` icon.\n\n<Row>\n<Column colLg={8}>\n\n![Example of next as a button with icon](images/common-action-11.png)\n\n</Column>\n</Row>\n\n## Refresh\n\nThis action reloads the view of an object, list, or data set when the displayed view has become unsynchronized with the source.\n\nUse the `refresh` icon or a button.\n\n<Row>\n<Column colLg={8}>\n\n![Example of edit in a data table cell](images/common-action-12.png)\n\n</Column>\n</Row>\n\n## Remove\n\nThis action removes an object from a list or item. Remove is distinct from delete, as a removed item is not destroyed. Multiple objects can be removed at once.\n\n<Row>\n<Column colLg={8}>\n\n![Example of remove in a structured list](images/common-action-5.png)\n\n</Column>\n</Row>\n\n### Hierarchy and placement\n\nRepresent remove as a button or `subtract` icon or glyph. The remove action is rarely the primary action on the page and should not be overly emphasized.\n\n### Considerations\n\n- What are the implications of the remove action for the user? Are there financial, access, or legal considerations?\n- This action can be confused with deleting.\n- A user may not have the correct permissions for this action.\n- Inform the user if the result is permanent.\n- How long will the action take? Seconds, minutes, hours, or days?\n- What should the user do if the removal fails?\n- Is this a single or bulk action?\n\n## Reset\n\nReset reverts values back to their last saved state. The last saved state includes the values stored the last time the user clicked or triggered **Apply**.\n\n<Row>\n<Column colLg={8}>\n\nReset is typically applied as a link.\n\n![Example of reset in a filter](images/common-action-6.png)\n\n</Column>\n</Row>\n","fileAbsolutePath":"/zeit/3f757860/src/pages/patterns/common-actions/index.mdx"}}}}