Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
This is a pre-release version and is not production ready. For new and ongoing projects, please refer to the latest Design System version.
next.design-system.post.ch/?path=/docs/021d61aa-e039-4858-b4b9-b86a3e772811--docs&story=Default#021d61aa-e039-4858-b4b9-b86a3e772811--default
/?path=/story/021d61aa-e039-4858-b4b9-b86a3e772811--default&full=true
<div class="btn-group" role="group" aria-label="Button group example"> <button type="button" class="btn btn-md btn-secondary">Left</button> <button type="button" class="btn btn-md btn-secondary">Middle</button> <button type="button" class="btn btn-md btn-secondary">Right</button> </div>
Make sure the @swisspost/design-system-styles
package is already present in your project or follow the installation guidelines.
To import all Design System styles:
@use '@swisspost/design-system-styles/post-compact.scss';
To import only the styles required for this component:
@use '@swisspost/design-system-styles/basics.scss'; @use '@swisspost/design-system-styles/components/button-group.scss';
The following examples show the different characteristics of the component. These can differ in the type of visualization, the html structure, as well as when, how and why they are displayed.
You can change the size of buttons belonging to a group using button-sizing classes: .btn-sm
, .btn-md
and .btn-lg
.
Just be sure to apply the same class to all buttons contained in the group.
next.design-system.post.ch/?path=/docs/021d61aa-e039-4858-b4b9-b86a3e772811--docs&story=Sizing#021d61aa-e039-4858-b4b9-b86a3e772811--sizing
/?path=/story/021d61aa-e039-4858-b4b9-b86a3e772811--sizing&full=true
Any HTML element that can be styled as a button can potentially be used in a button group. It is also possible to use checkable inputs:
next.design-system.post.ch/?path=/docs/021d61aa-e039-4858-b4b9-b86a3e772811--docs&story=Checks#021d61aa-e039-4858-b4b9-b86a3e772811--checks
/?path=/story/021d61aa-e039-4858-b4b9-b86a3e772811--checks&full=true