Skip to main content


Spacer component is used to give additional white space between two components in an interface. You can customize the size and direction with the provided properties.


Open in new window
<div class="spacer-demo">
<duet-spacer size="xxxx-large"></duet-spacer>
<duet-spacer size="xxx-large"></duet-spacer>
<duet-spacer size="xx-large"></duet-spacer>
<duet-spacer size="x-large"></duet-spacer>
<duet-spacer size="large"></duet-spacer>
<duet-spacer size="medium"></duet-spacer>
<duet-spacer size="small"></duet-spacer>
<duet-spacer size="x-small"></duet-spacer>
<duet-spacer size="xx-small"></duet-spacer>
Open in new window
<div class="spacer-demo">
<duet-spacer size="xxxx-large" direction="horizontal"></duet-spacer>
<duet-spacer size="xxx-large" direction="horizontal"></duet-spacer>
<duet-spacer size="xx-large" direction="horizontal"></duet-spacer>
<duet-spacer size="x-large" direction="horizontal"></duet-spacer>
<duet-spacer size="large" direction="horizontal"></duet-spacer>
<duet-spacer size="medium" direction="horizontal"></duet-spacer>
<duet-spacer size="small" direction="horizontal"></duet-spacer>
<duet-spacer size="x-small" direction="horizontal"></duet-spacer>
<duet-spacer size="xx-small" direction="horizontal"></duet-spacer>
Open in new window
<div class="spacer-demo">
<duet-spacer breakpoint="xx-large" size="xxxx-large"></duet-spacer>
<duet-spacer breakpoint="x-large" size="xxx-large"></duet-spacer>
<duet-spacer breakpoint="large" size="xx-large"></duet-spacer>
<duet-spacer breakpoint="medium" size="x-large"></duet-spacer>
<duet-spacer breakpoint="small" size="large"></duet-spacer>
<duet-spacer breakpoint="x-small" size="medium"></duet-spacer>
<duet-spacer breakpoint="xx-small" size="small"></duet-spacer>

Properties #

Property Attribute Description Type Default
breakpoint breakpoint Adjusts the breakpoint where the spacer is shown in. The functionality follows 1:1 the media queries defined in design tokens. Can be one of: "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large". "" or "large" or "medium" or "small" or "x-large" or "x-small" or "xx-large" or "xx-small" ""
direction direction Direction of the space added. Can be one of: "vertical", "horizontal". "horizontal" or "vertical" "vertical"
size size Size variation of the spacer. Can be any of the spacing tokens. "large" or "medium" or "small" or "x-large" or "x-small" or "xx-large" or "xx-small" or "xxx-large" or "xxxx-large" "medium"

Dependencies #

Used by #

Graph #

graph TD;
duet-card --> duet-spacer
duet-choice --> duet-spacer
duet-choice-group --> duet-spacer
duet-modal --> duet-spacer
duet-radio-group --> duet-spacer
duet-step --> duet-spacer
style duet-spacer fill:#f9f,stroke:#333,stroke-width:4px


For integration, event and theming guidelines, please see Using Components. This documentation explains how to implement and use Duet’s components across different technologies like Angular, React or Vanilla JavaScript.


Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:


Building Layouts


Using CLI Tools


Creating Custom Patterns


Server Side Rendering


Sharing Prototypes


If you experience any issues while using a component, please head over to the Support page for more guidelines and help.