Skip to main content
Light Dark System
Get ready for more awesome! Web Awesome, the next iteration of Shoelace, is on Kickstarter. Read Our Story

Bar

<sl-bar> | SlBar
since ViUR 0.7 experimental

Use bar elements for vertical alignment and horizontal distribution.

Just some Text
A Button A Link Just some Text
Just some Text A Link A Link
<sl-bar>
  <div slot="left">
		<span>Just some Text</span>
	</div>
	<div slot="center">
		<sl-button size="small">A Button</sl-button>
		<a href="#">A Link</a>
		<span>Just some Text</span>
	</div>
	<div slot="right">
		<span>Just some Text</span>
		<a href="#">A Link</a>
		<a href="#">A Link</a>
 
	</div>

</sl-bar>

Examples

Zurücksetzen Absenden
<sl-bar>
	<sl-input slot="left" placeholder="Label" size="small" type="text"></sl-input>

	<div slot="right">
		<sl-button variant="danger" size="small">Zurücksetzen</sl-button>
		<sl-button variant="success" size="small">Absenden</sl-button>
	</div>
</sl-bar>

Importing

If you’re using the autoloader or the traditional loader, you can ignore this section. Otherwise, feel free to use any of the following snippets to cherry pick this component.

Script Import Bundler React

To import this component from the CDN using a script tag:

<script type="module" src="https://cdn.jsdelivr.net/npm/@viur/shoelace@1.0.8-v2.18.0/cdn/components/bar/bar.js"></script>

To import this component from the CDN using a JavaScript import:

import 'https://cdn.jsdelivr.net/npm/@viur/shoelace@1.0.8-v2.18.0/cdn/components/bar/bar.js';

To import this component using a bundler:

import '@viur/shoelace/dist/components/bar/bar.js';

To import this component as a React component:

import SlBar from '@viur/shoelace/dist/react/bar';

Slots

Name Description
left elements placed left
center elements placed center
right elements placed right

Learn more about using slots.

Parts

Name Description
left The component’s left wrapper.
center The component’s center wrapper.
right The component’s right wrapper.

Learn more about customizing CSS parts.