Skip to main content

Spacer ready

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.

Examples

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>
</div>
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>
</div>
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>
</div>

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". string ""
direction direction Direction of the space added. Can be one of: "vertical", "horizontal". string "vertical"
size size Size variation of the spacer. Can be any of the spacing tokens. string "medium"

Dependencies #

Used by #

Graph #

graph TD;
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

Integration

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.



Tutorials

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

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Server Side Rendering


Troubleshooting

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