User Guide Cancel

Set fixed padding for components and groups

  1. Adobe XD User Guide
  2. Introduction
    1. Release updates
    2. Common questions
    3. Design, prototype, and share with Adobe XD
    4. Color Management
    5. System requirements
      1. Hardware and software requirements
      2. Adobe XD, Big Sur, and Apple silicon | macOS 11
    6. Workspace basics
    7. Change app language in Adobe XD
    8. Access UI design kits
    9. Accessibility in Adobe XD
    10. Keyboard shortcuts
    11. Tips and tricks
  3. Design
    1. Artboards, guides, and layers
      1. Get started with artboards
      2. Use guides and grids
      3. Create scrollable artboards
      4. Work with layers
      5. Create scroll groups
    2. Shapes, objects, and path
      1. Select, resize, and rotate objects
      2. Move, align, distribute, and arrange objects
      3. Group, lock, duplicate, copy, and flip objects
      4. Set stroke, fill, and drop shadow for objects
      5. Create repeating elements
      6. Create perspective designs with 3D transforms
      7. Edit objects using Boolean operations
    3. Text and fonts
      1. Work with drawing and text tools
      2. Fonts in Adobe XD
    4. Components and states
      1. Work with components
      2. Work with nested components
      3. Add multiple states to components
    5. Masking and effects
      1. Create a mask with shapes
      2. Work with blur effects
      3. Create and modify gradients
      4. Apply blend effects
    6. Layout
      1. Responsive resize and constraints
      2. Set fixed padding for components and groups
      3. Create dynamic designs with stacks
    7. Videos and Lottie animations
      1. Work with videos
      2. Create prototypes using videos
      3. Work with Lottie animations
  4. Prototype
    1. Create interactive prototypes
    2. Animate prototypes
    3. Object properties supported for auto-animate
    4. Create prototypes with keyboard and gamepad
    5. Create prototypes using voice commands and playback
    6. Create timed transitions
    7. Add overlays
    8. Design voice prototypes
    9. Create anchor links
    10. Create hyperlinks
    11. Preview designs and prototypes
  5. Share, export, and review
    1. Share selected artboards
    2. Share designs and prototypes
    3. Set access permissions for links
    4. Work with prototypes
    5. Review prototypes
    6. Work with design specs
    7. Share design specs
    8. Inspect design specs
    9. Navigate design specs
    10. Review and comment design specs
    11. Export design assets
    12. Export and download assets from design specs
    13. Group sharing for enterprise
    14. Back up or transfer XD assets
  6. Design systems
    1. Design systems with Creative Cloud Libraries
    2. Work with document assets in Adobe XD
    3. Work with Creative Cloud Libraries in Adobe XD
    4. Migrate from linked assets to Creative Cloud Libraries
    5. Work with design tokens 
    6. Use assets from Creative Cloud Libraries
  7. Cloud documents
    1. Cloud documents in Adobe XD
    2. Collaborate and coedit designs
    3. Coedit documents shared with you
  8. Integrations and plugins
    1. Work with external assets
    2. Work with design assets from Photoshop
    3. Copy and paste assets from Photoshop
    4. Import or open Photoshop designs
    5. Work with Illustrator assets in Adobe XD
    6. Open or import Illustrator designs
    7. Copy vectors from Illustrator to XD
    8. Plugins for Adobe XD
    9. Create and manage plugins
    10. Jira integration for XD
    11. Slack plugin for XD
    12. Zoom plug-in for XD
    13. Publish design from XD to Behance
  9. XD for iOS and Android
    1. Preview on mobile devices
    2. Adobe XD on mobile FAQ
  10. Troubleshooting
    1. Known and fixed issues
      1. Known issues
      2. Fixed issues
    2. Installation and updates
      1. XD appears as not compatible on Windows
      2. Error code 191
      3. Error code 183
      4. Issues installing XD plugins
      5.  Prompt to uninstall and reinstall XD on Windows 10
      6. Issues with preferences migration
    3. Launch and crash
      1.  XD crashes when launched on Windows 10
      2.  XD quits when you sign out of Creative Cloud
      3. Issue with subscription status on Windows
      4. Blocked-app warning when launching  XD on Windows
      5. Crash dump generation on Windows
      6. Crash log collection and sharing
    4. Cloud documents and Creative Cloud Libraries
      1. Issues with XD cloud documents
      2. Issues with linked components
      3. Issues with libraries and links
    5. Prototype, publish, and review
      1. Unable to record prototype interactions on macOS Catalina
      2. Issues with publish workflows
      3. Published  links do not appear in browsers
      4. Prototypes do not render correctly in browsers
      5. Commenting panel suddenly showing up on shared links
      6. Unable to publish libraries
    6. Import, export, and working with other apps
      1. Import and export in XD
      2. Photoshop files in XD
      3. Illustrator files in XD
      4. Export to After Effects from XD
      5. Sketch files in XD
      6. Third-party apps not visible in Export

Learn how to use fixed padding to create content-aware layouts such as buttons, drop-downs, tool tips, or modal dialogs with ease.

Adobe XD enables you to set fixed padding values on groups or components with states and automatically scale the background when content changes are made.

This reduces design friction and cognitive overload when creating buttons, drop-downs, tool tips, or modal dialogs.

1
Usage of padding to create content-aware layout

Unlike responsive resize that acts when you resize an entire group, padding acts when you change the content within a group.

Goodbye to manual resizing and hello to flexibility and faster workflows!

Work with padding

Padding is the distance from the visual background to the edge of the content on each side identified by a stretched background. 

XD automatically identifies a background when:

  • Any shape, group, or Boolean group is positioned lowest in the group or component layer, and 
  • Other elements overlap the lowest layer. 
Padding
Same padding values in all directions

To precisely control the background size of an object through padding, follow these steps: 

  1. From the Property Inspector, toggle to enable the padding button.
  2. Based on your design needs, set values for Same padding for all directions or Different padding for each direction.
1
Different padding values for each direction

You can view the Padding option only if the background element of the layer structure is positioned last in the group and it overlaps other objects.

When you move or resize the content within a group or component, XD identifies the background, calculates the padding values, and updates them in the Property Inspector.

The updated values are maintained in the group or component and the background is automatically resized. When a group or component has no visual background, the padding value is set to 0.

Want to modify the padding values?

Use any of the following options:

  • In the Property Inspector, update the existing padding values.
  • To resize padding on a canvas, press the  `  key, hover over the padding area, and drag.
  • To update the padding values on a group or component, manually resize or move the background on canvas.
  • To edit all the padding values, select Shift + `.
  • To edit opposing padding values, select  ` + Alt.

Examples

When you increase the padding values, XD creates an invisible padding that acts as a safe-space around logos or in a larger tap area for buttons when prototyping.

  • Want to change a label of a button? Type in the next text and the button resizes.
  • Want to add more rows in a dropdown? Use repeat grid to create more rows within a group and notice that the background resizes with the repeat grid.
Repeat grids and padding
Use repeat grid with padding

Padding in components with states

Components inherit the padding behavior from their master component. This means that the padding values set on the master component are synced across instances or states.

Padding override occurs when you:

  • Change the padding values on a component instance and in a master component, or
  • The instance does not update its padding values.

Things to keep in mind

  • When you enable padding:
    • All instances of components and states automatically inherit the property set on the master component or default state without the option to locally override them.
    • Send to Back option in the canvas positions any item in a group or component just above the group background.
  • If the background is a Boolean group, a mask, or a component, responsive resize rules are applied to resize the object.
  • If you delete a background, XD evaluates the group and automatically promotes the next potential layer as a background and updates the padding values. If there is no background layer, padding value is reset to 0.

Limitations

  • Components and point text cannot act as a background for a group or component.
  • Padding does not animate in Prototype mode when using Hover or Tap states within the design content.

Examples and sample files

Want to change the label of a button without the label overflowing outside the button?

1
Sample files

  1. Download and open the sample button file in XD.
  2. Select the object and its background.
  3. To control the background and the content within the button, enable Padding in the Property Inspector.
  4. Based on your design needs, select and apply any of the padding options.

Learn more

Viewing time: 7 minutes.

What's next?

We've got you started with padding. Take a step forward and learn how to create interactive designs or prototypes and share them with stakeholders such as developers and fellow designers.

Have a question or an idea?

Ask the Community

If you have a question to ask or an idea to share, come and participate in Adobe XD Community. We would love to hear from you and see your creations.

Get help faster and easier

New user?