Carbon Design System (2024)

File uploaders allow users to select one or more files to upload to a specificlocation.

  • Live demo
  • Overview
  • Formatting
  • Content
  • File uploader
  • Drag and drop file uploader
  • References
  • Feedback

Live demo

      This live demo contains only a preview of functionality and styles available for this component. View the full demo on Storybook for additional information such as its version, controls, and API documentation.

      Accessibility testing status

      For every latest release, Carbon runs tests on all components to meet the accessibility requirements. These different statuses report the work that Carbon has done in the back end. These tests appear only when the components are stable.

      Overview

      File uploaders allow users to upload content of their own. A file uploader iscommonly found in forms, but can also live as a standalone element. There aretwo variants of file uploaders—our default file uploader and a drag and dropfile uploader.

      Variants

      VariantWay it works
      File uploaderUpload one or more files by clicking an action button that prompts a file selection dialog.
      Drag and drop file uploaderDrag and drop selected files directly into a drop zone area to upload.

      When to use

      • Uploading one or more files.
      • Uploading files by dragging and dropping.
      • Showing the process of uploading.

      When not to use

      • Do not use upload in a modal when multiple files are uploaded, as uploadedfiles stack vertically.

      Formatting

      Anatomy

      Carbon Design System (1)

      1. Heading: Text to describe the upload section.
      2. Description: Text to help the user make an informed selection.
      3. Button or drop zone label: The action to select a file to upload.
      4. Uploaded file: A file that has successfully been uploaded.
      5. x: The delete x icon will remove the uploaded file.

      Sizing

      The button and uploaded files should be the same height. If the file uploader ispresent in a form with other inputs, use the same height for the form inputs andthe file uploader for consistency.

      Carbon Design System (2)

      File uploader sizeHeight (px/rem)Use case
      Large48/3Choose this size when there is a lot of space to work with.
      Medium40/2.5This is our default size and should be used whenever possible.
      Small32/2Use when space is constricted or when placing a file uploader in a form that is long and complex.

      Alignment

      Left align the button or drop zone area with the uploaded files. Multiple fileswill stack vertically.

      Carbon Design System (3)

      Placement

      When including a button as the action to upload a file, use either a primary ortertiary button depending on your use case. If there is already a primary buttonpresent on the page, use a tertiary button for the file uploader so it does notconflict with the primary action.

      Carbon Design System (4)

      Content

      Main elements

      Heading

      • Informs users about the purpose of the upload section. “Upload files” is thedefault text that appears with the file uploader.
      • Keep the heading short and concise by limiting it to a single line of text.

      Description

      • Descriptions help communicate to the user what file size or format limitationsthere are.

      Button or drop zone label

      • Button labels should be concise and describe the action that will be takenupon click. “Add files” is the default text that appears with the fileuploader.
      • Drop zone area label should describe that you can either drag and drop a fileinto the drop zone or click on the button to upload a file.

      Uploaded file text

      • The name of the file that has been uploaded.

      Overflow

      Use an ellipsis (…) if the filename extends beyond the width of its parentelement. A tooltip should appear on hover to disclose the full length of thefilename.

      Carbon Design System (5)

      Further guidance

      For further content guidance, see Carbon’scontent guidelines.

      Loading states

      A file that is being uploaded has three distinct states—loading, success, anduploaded.

      Carbon Design System (6)

      Interactions

      Mouse

      Dragging your mouse anywhere within the bounds of the drop zone area with anattached file will enable you to drop it inside of the area and begin to upload.

      Carbon Design System (7)

      To remove an uploaded file, click the “x” (or delete) icon.

      Carbon Design System (8)

      Keyboard

      Upload button or drop zone:

      • The file uploader button or drop zone can be activated by pressing Space orEnter.
      • After the file selection dialog closes, focus should retain the user’s pointof regard and return to the element that invoked it.

      Uploaded file:

      • Pressing Tab shifts focus to the “x” icon.
      • Pressing Space or Enter while the “x” icon is in focus will delete thefile.

      For additional keyboard interactions, see theaccessibility tab.

      Validation

      When a specific file cannot be uploaded successfully it will show an errorstate. We have an option for a single line or multi-line error state dependingon how descriptive the message needs to be. Error messages should provide clearguidance to help the user resolve the error.

      If the error relates to the file uploader as a whole instead of an individualfile, you can alternatively use an inline error notification.

      Carbon Design System (9)

      File uploader

      A file uploader traditionally uploads one or more files by clicking an actionbutton that prompts a file selection dialog. Once you have selected one or morefiles from the dialog, the selected files will populate below the file uploaderon the page. Your file may temporarily display a loading state before uploadinghas been successfully completed.

      Carbon Design System (10)

      Drag and drop file uploader

      Drag and drop file uploaders are used to directly upload files by dragging anddropping them into a drop zone area. Alternatively, you can open files through afile selection dialog by clicking the text link description inside the dropzone.

      The drop zone component lets users upload files by dragging and dropping thefiles into an area on a page, or activating a button. By default, the drag anddrop file uploader allows multiple files to be dropped into the drop zone area.However, we also offer functionality to limit a single file to be uploaded.

      Carbon Design System (11)

      Uploading multiple files

      When dragging files into the drop zone area, the drop zone border changes incolor and thickness to indicate the area has been activated and is ready forfiles. Additionally once the cursor hits the drop zone area it changes with apreview of the file you are about to upload. The style of cursor change isrendered by the browser you use.

      Carbon Design System (12)

      A file being dragged into the drop zone area.

      Carbon Design System (13)

      A file successfully uploaded when you can upload multiple files.

      Uploading a single file

      When using a drag and drop file uploader, if the requirement only allows asingle file to be uploaded, drag the single file into the drop zone area toupload it. Once uploaded, the drop zone area will be removed to show that youhave successfully uploaded a single file. Click the close icon in the uploadedfile to remove it.

      Carbon Design System (14)

      A file successfully uploaded when you can only upload a single file.

      References

      Page Laubheimer,Drag–and–Drop: How to Design for Ease of Use,(Nielsen Norman Group, 2020)

      Feedback

      Help us improve this component by providing feedback, asking questions, andleaving any other comments onGitHub.

      Carbon Design System (2024)

      FAQs

      What is the Carbon Design System? ›

      Carbon Design System. Carbon is IBM's open source design system for products and digital experiences. With the IBM Design Language as its foundation, the system consists of working code, design tools and resources, human interface guidelines, and a vibrant community of contributors.

      Who owns Carbon Design System? ›

      Carbon is funded and built by IBM, which means we build for the company's business needs, but we've made it open source for anyone to use and contribute back to. While being primarily open source, Carbon also serves various parts of the IBM business that follow an inner source model.

      What is the dark theme in Carbon Design System? ›

      There are two dark themes: Gray 90 and Gray 100. For enabled UI colors, dark themes primarily use the color range of Gray 100 through Gray 70, and for text and icons uses the color range between White and Gray 50. All of the themes are available in Design kits.

      What is the IBM design system called? ›

      IBM's design system is known as Carbon, which has earned recognition for its open-source application in product and experience design.

      Is the carbon design system free? ›

      Carbon Design System is a free and open-source design system and library created by IBM, which implements the IBM Design Language, and licensed under Apache License 2.0.

      How does the carbon system work? ›

      The carbon cycle describes the process in which carbon atoms continually travel from the atmosphere to the Earth and then back into the atmosphere. Since our planet and its atmosphere form a closed environment, the amount of carbon in this system does not change.

      What design system does Spotify use? ›

      Encore Foundation

      It is also the place where design tokens reside. These are the primary things that almost all companies should incorporate in their design systems. In fact, this is what makes Spotify look the way it does. All Spotify products are required to use the Encore Foundation.

      Is carbon design system accessible? ›

      Visual impairments can include low vision, color blindness, and complete blindness. Carbon components are designed to accommodate the entire spectrum of visual impairment, though designers still need to exercise diligence to ensure that the components are used correctly.

      Who is carbon competitor? ›

      Carbon competitors include HP Inc., 3D Systems, Formlabs, Stratasys and Desktop Metal.

      What colors does Carbon system use? ›

      Carbon defines a natural gray and 7 color families; Green, Teal, Cyan, Blue, Purple, and Magenta. Each color family is given as 10 values, ranging from light to dark colors, for example, Blue-10, Blue-20, .. Blue-100. Additional single action colors values are provided in Red, Orange, Yellow, and Green.

      How many colors should a design system have? ›

      Typically, a design system doesn't need to offer many color options. For a good and effective system, five colors would be enough: one as a base, two as lighter tones, and two for shades. By limiting the number of swatches, you'll simplify the design process and ensure consistency throughout your projects.

      How does Dark theme work? ›

      Dark themes reduce the luminance emitted by device screens, while still meeting minimum color contrast ratios. They help improve visual ergonomics by reducing eye strain, adjusting brightness to current lighting conditions, and facilitating screen use in dark environments – all while conserving battery power.

      What is IBM now called? ›

      Kyndryl Holdings, Inc. is an American multinational information technology infrastructure services provider. Headquartered in New York City and created from the spin-off of IBM's infrastructure services business in 2021, the company designs, builds, manages and develops large-scale information systems.

      What is the Carbon design framework? ›

      Carbon Design System is a complete set of visual, user experience, and code guidelines and standards for the IBM Cloud platform and the more than 120 services offered on the platform.

      What is the IBM logo called? ›

      The standard-bearer for that brand is the instantly recognizable “8-bar,” an iconic logo created by the legendary designer Paul Rand. The 8-bar has proven remarkably resilient over the decades, remaining unchanged since 1972.

      What is carbon management system? ›

      Carbon capture, removal, transport, reuse, and storage technologies, commonly referred to as carbon management, are a portfolio of safe, effective, and increasingly cost-effective emissions technologies to manage, abate, and remove CO2 and CO emissions from industrial facilities, power plants, and directly from the air ...

      What is carbon accounting system? ›

      What is carbon accounting? Carbon accounting is a way of calculating how much greenhouse gas an organization emits. Like financial accounting, carbon accounting quantifies the impact of an organization's business activities – though instead of financial impact, it tracks climate impact.

      How does the carbon program work? ›

      Carbon credits were devised as a mechanism to reduce greenhouse gas emissions. Companies receive a set number of credits that decline over time and they can sell any excess credits to another company. Carbon credits create a monetary incentive for companies to reduce their carbon emissions.

      What is a carbon tax system? ›

      Under a carbon tax, the government sets a price that emitters must pay for each ton of greenhouse gas emissions they emit. Businesses and consumers will take steps, such as switching fuels or adopting new technologies, to reduce their emissions to avoid paying the tax.

      Top Articles
      Latest Posts
      Article information

      Author: Trent Wehner

      Last Updated:

      Views: 6720

      Rating: 4.6 / 5 (56 voted)

      Reviews: 87% of readers found this page helpful

      Author information

      Name: Trent Wehner

      Birthday: 1993-03-14

      Address: 872 Kevin Squares, New Codyville, AK 01785-0416

      Phone: +18698800304764

      Job: Senior Farming Developer

      Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

      Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.