diff --git a/convenience/generate-component/boilerplate/readme.md b/convenience/generate-component/boilerplate/readme.md
index ad92aa4f194..fef26ab3ff7 100644
--- a/convenience/generate-component/boilerplate/readme.md
+++ b/convenience/generate-component/boilerplate/readme.md
@@ -1,11 +1,45 @@
-To be documented...
+> Explain the use and the purpose of the component, add minor details if needed, and provide a basic example.
+> If you reference other components, link at least once their documentation page (the path must start from "/docs/...").
+> Use triple backticks for the examples code block.
-### Prop, event, method, accessibility...
-
-Brief description
+The `__name__` is a component...
```html
<__name__>
```
+> The following list of "## Paragraph" is only suggested; remove, create and adapt based on needs.
+
+## Slots
+
+> Describe slot naming and usage and provide an example of slotted content.
+
+## States
+
+> Describe the component states (`disabled`, `readonly`, etc.) and provide an example.
+
+## Style
+
+> Describe the properties which change the component visualization (`size`, `negative`, etc.) and provide an example.
+
+## Interactions
+
+> Describe how it's possible to interact with the component (open and close a `sbb-dialog`, dismiss a `sbb-alert`, etc.) and provide an example.
+
+## Events
+
+> Describe events triggered by the component and possibly how to get information from the payload.
+
+## Keyboard interaction
+
+> If the component has logic for keyboard navigation (as the `sbb-calendar` or the `sbb-select`) describe it.
+
+| Keyboard | Action |
+|----------------|---------------|
+| Key | What it does. |
+
+## Accessibility
+
+> Describe how accessibility is implemented and if there are issues or suggested best-practice for the consumers.
+
\ No newline at end of file
diff --git a/src/components/sbb-accordion/readme.md b/src/components/sbb-accordion/readme.md
index 2a610c3b9d5..82454063bc5 100644
--- a/src/components/sbb-accordion/readme.md
+++ b/src/components/sbb-accordion/readme.md
@@ -14,7 +14,7 @@ for one or more [sbb-expansion-panel](/docs/components-sbb-accordion-sbb-expansi
```
-### Variants
+## Variants
The `multi` property, if set, allows having more than one `sbb-expansion-panel` expanded at the same time.
@@ -24,7 +24,7 @@ The `multi` property, if set, allows having more than one `sbb-expansion-panel`
```
-### Style
+## Style
The component has a `titleLevel` property, which is proxied to each inner `sbb-expansion-panel-header`, and can be used
to wrap the header of each `sbb-expansion-panel` in a heading tag; if the property is unset, a `div` is used.
diff --git a/src/components/sbb-action-group/readme.md b/src/components/sbb-action-group/readme.md
index 9dc5992c7db..3f58c2116b4 100644
--- a/src/components/sbb-action-group/readme.md
+++ b/src/components/sbb-action-group/readme.md
@@ -2,9 +2,9 @@ The `sbb-action-group` component is a generic content container which can contai
([sbb-button](/docs/components-sbb-button--docs) or [sbb-link](/docs/components-sbb-link--docs) or other HTML elements)
in various [allocations](#allocations).
-### Style
+## Style
-#### Orientation
+### Orientation
The `orientation` property is used to set item's orientation.
Possible values are `horizontal` (default) and `vertical`.
@@ -26,7 +26,7 @@ indicate the minimum breakpoint from which the orientation changes to `horizonta
```
-#### Button-size and link-size
+### Button-size and link-size
The two props `button-size` and `link-size` can be used to override, respectively, the size of the inner `sbb-button` and `sbb-link`.
Default values are `l` for `sbb-button` and `m` for `sbb-link`.
@@ -43,7 +43,7 @@ Default values are `l` for `sbb-button` and `m` for `sbb-link`.
```
-#### Align-group and align-self
+### Align-group and align-self
The `align-group` property can be used to set the default alignment of the contained elements;
possible values are `start`, `center`, `stretch` and `end`.
@@ -63,7 +63,7 @@ opposite direction to the group; possible values are `start`, `center` or `end`.
```
-### Allocations
+## Allocations
Items can be displayed inside `sbb-action-group` in different allocations.
@@ -82,7 +82,7 @@ and we consider a template like the following one (possibly removing the link fo
The values for `align-group` and `align-self` for the various allocations are as follows:
-#### Horizontal
+### Horizontal
| orientation='horizontal' | align-group | align-self |
|:------------------------:|:-----------:|:------------------:|
@@ -93,7 +93,7 @@ The values for `align-group` and `align-self` for the various allocations are as
| 2-0-0 | start | / |
| 1-0-1 | start | Button 2: 'end' |
-#### Vertical
+### Vertical
| orientation='vertical' | align-group | align-self |
|:----------------------:|:-----------:|:----------:|
diff --git a/src/components/sbb-alert-group/readme.md b/src/components/sbb-alert-group/readme.md
index 22e820d812f..deef26a15e7 100644
--- a/src/components/sbb-alert-group/readme.md
+++ b/src/components/sbb-alert-group/readme.md
@@ -18,7 +18,7 @@ The `sbb-alert-group` manages the dismissal and accessibility of one or multiple
```
-### Interactions
+## Interactions
If all the `sbb-alert`s are dismissed, it's recommended to completely remove the `sbb-alert-group` from DOM.
diff --git a/src/components/sbb-alert/readme.md b/src/components/sbb-alert/readme.md
index 515fbcabec8..4a0d81d2a06 100644
--- a/src/components/sbb-alert/readme.md
+++ b/src/components/sbb-alert/readme.md
@@ -3,7 +3,7 @@ The `sbb-alert` is a component which should be used to display important message
Multiple instances of this component can be used within
the [sbb-alert-group](/docs/components-sbb-alert-sbb-alert-group--docs) component.
-### Slots
+## Slots
The text content is projected using and unnamed slot, while the title uses the slot named `title` or alternatively the `titleContent` property.
The component can optionally display a `sbb-icon` at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -24,7 +24,7 @@ The component can optionally display a `sbb-icon` at the component start using t
```
-### Interactions
+## Interactions
It's possible to place an action, which by clicking navigates somewhere to display more information.
This can be done using the `linkContent` property combined with the `href` one.
@@ -50,7 +50,7 @@ which automatically removes an alert after clicking the close button.
```
-### Style
+## Style
Users can choose between two `size`, `m` (default) and `l`.
diff --git a/src/components/sbb-autocomplete/readme.md b/src/components/sbb-autocomplete/readme.md
index 3f39d9ffc85..df53e72f896 100644
--- a/src/components/sbb-autocomplete/readme.md
+++ b/src/components/sbb-autocomplete/readme.md
@@ -18,7 +18,7 @@ Both accept an id or an element reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the component is used within a [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs),
it will automatically connect to the native ` ` as trigger and will display the option panel above or below the `sbb-form-field`.
@@ -38,14 +38,14 @@ it will automatically connect to the native ` ` as trigger and will displa
```
-### Style
+## Style
-#### Option highlight
+### Option highlight
By default, the autocomplete will highlight the label of the `sbb-option` in the panel, if it matches the typed text.
See the [sbb-option](/docs/components-sbb-option-sbb-option--docs) for more details.
-#### Option grouping
+### Option grouping
The displayed `sbb-option` can be collected into groups using `sbb-optgroup` element:
@@ -68,11 +68,11 @@ The displayed `sbb-option` can be collected into groups using `sbb-optgroup` ele
```
-### Events
+## Events
The `sbb-option` emits the `option-selected` event when selected via user interaction.
-### Keyboard interaction
+## Keyboard interaction
The options panel opens on `focus`, `click` or `input` events on the trigger element, or on `ArrowDown` keypress;
it can be closed on backdrop click, or using the `Escape` or `Tab` keys.
diff --git a/src/components/sbb-breadcrumb-group/readme.md b/src/components/sbb-breadcrumb-group/readme.md
index 9c14ef649f1..6d25dfc2541 100644
--- a/src/components/sbb-breadcrumb-group/readme.md
+++ b/src/components/sbb-breadcrumb-group/readme.md
@@ -13,7 +13,7 @@ which are meant to represent the hierarchy of visited pages before arriving to t
```
-### Style
+## Style
If the width of all the nested `sbb-breadcrumb` exceeds the container width,
only the first and the last breadcrumb are displayed, and a new one with the ellipsis symbol appears between them.
diff --git a/src/components/sbb-breadcrumb/readme.md b/src/components/sbb-breadcrumb/readme.md
index 9229d5b1cbd..a7d42dfeee3 100644
--- a/src/components/sbb-breadcrumb/readme.md
+++ b/src/components/sbb-breadcrumb/readme.md
@@ -3,7 +3,7 @@ The `sbb-breadcrumb` is a component used to display a link to a page.
When it's used within the [sbb-breadcrumb-group](/docs/components-sbb-breadcrumb-sbb-breadcrumb-group--docs) component,
it can display the list of the links the user visited to arrive at the current page.
-### Slots
+## Slots
It is possible to provide a text via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -20,7 +20,7 @@ Text and icon are not exclusive and can be used together.
```
-### Link properties
+## Link properties
It's possible to set all the link related properties (`download`, `href`, `rel` and `target`).
diff --git a/src/components/sbb-button/readme.md b/src/components/sbb-button/readme.md
index 1e040c0f063..f271f3abe41 100644
--- a/src/components/sbb-button/readme.md
+++ b/src/components/sbb-button/readme.md
@@ -4,7 +4,7 @@ The `sbb-button` component provides the same functionality as a native `
Button text
```
-### Slots
+## Slots
The button text is provided via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -23,7 +23,7 @@ At least one is mandatory, so you can have a `sbb-button` with icon only, text o
```
-### Link / button properties
+## Link / button properties
The component can be internally rendered as a button or as a link,
depending on the value of the `href` property, so the associated properties are available
@@ -44,7 +44,7 @@ If the component is placed inside an `sbb-form-field`, it renders with the corre
```
-### Style
+## Style
The component has four color variants that can be set using the `variant` property (default: `primary`),
and it has also a negative one which can be set using the `negative` property.
@@ -63,7 +63,7 @@ The component can be displayed in `disabled` state using the self-named property
Button
```
-#### Focus outline
+### Focus outline
Please make sure that the focus outline appears in the correct color if the component is used on a dark background.
You can set it by re-defining the css var on `sbb-button` or any parent element:
diff --git a/src/components/sbb-calendar/readme.md b/src/components/sbb-calendar/readme.md
index 2b65a337d0b..97b096ba1d0 100644
--- a/src/components/sbb-calendar/readme.md
+++ b/src/components/sbb-calendar/readme.md
@@ -20,7 +20,7 @@ It's recommended to set the time to 00:00:00.
```
-### Style
+## Style
The component displays one month by default; two months can be displayed setting the `wide` property to `true`.
@@ -31,12 +31,12 @@ The component displays one month by default; two months can be displayed setting
It's also possible to filter out unwanted date using the `dateFilter` function property.
Note that using the `dateFilter` function as a replacement for the `min` and `max` properties will most likely result in a significant loss of performance.
-### Events
+## Events
Consumers can listen to the `dateSelected` event on the `sbb-calendar` component to intercept the selected date
which can be read from `event.detail`.
-### Keyboard interaction
+## Keyboard interaction
It's possible to move within the component using the keyboard.
diff --git a/src/components/sbb-card-action/readme.md b/src/components/sbb-card-action/readme.md
index 85b1228b369..0134f442fdf 100644
--- a/src/components/sbb-card-action/readme.md
+++ b/src/components/sbb-card-action/readme.md
@@ -4,7 +4,7 @@ The `sbb-card-action` is the component used to turn a `sbb-card` into an action.
Check all the wonderful trips available.
```
-### Link / button properties
+## Link / button properties
As the [sbb-link](/docs/components-sbb-link--docs) and the [sbb-button](/docs/components-sbb-button--docs),
the component can be internally rendered as a button or as a link,
diff --git a/src/components/sbb-card/readme.md b/src/components/sbb-card/readme.md
index 6da55570a4d..a29c5c0c1fd 100644
--- a/src/components/sbb-card/readme.md
+++ b/src/components/sbb-card/readme.md
@@ -4,12 +4,12 @@ The `sbb-card` component is a generic content container; its task is to contain
Card content
```
-### Slots
+## Slots
The content is projected in an unnamed slot.
It's possible to use the component together with the `sbb-card-badge` and the `sbb-card-action`.
-#### With `sbb-card-badge`
+### With `sbb-card-badge`
The `sbb-card-badge` component can be used to display a badge in the upper right corner.
The badge is hidden with card sizes are `xs` or `s`.
@@ -26,7 +26,7 @@ For API details, see the [sbb-card-badge](/docs/components-sbb-card-sbb-card-bad
```
-#### With `sbb-card-action`
+### With `sbb-card-action`
To add an action to a card, add a `sbb-card-action` to the main slot.
With the `sbb-card-action` all the card area becomes clickable.
@@ -39,7 +39,7 @@ For API details (mainly accessibility), see the [sbb-card-action](/docs/componen
```
-### Style
+## Style
It's possible to choose among seven different values for the `size` property (from `xs` to `xxxl`, default `m`);
the choice mainly affect the content's padding.
diff --git a/src/components/sbb-checkbox-group/readme.md b/src/components/sbb-checkbox-group/readme.md
index d0a03ddd7fe..5d9a18a0836 100644
--- a/src/components/sbb-checkbox-group/readme.md
+++ b/src/components/sbb-checkbox-group/readme.md
@@ -23,7 +23,7 @@ or, alternatively, for a collection of [sbb-selection-panel](/docs/components-sb
```
-### Slots
+## Slots
The content is projected in an unnamed slot.
@@ -39,7 +39,7 @@ right below the `sbb-checkbox-group` using the `error` slot.
```
-### States
+## States
It is possible to mark the entire group as disabled or required using the properties `disabled` and `required`.
@@ -55,7 +55,7 @@ It is possible to mark the entire group as disabled or required using the proper
```
-### Style
+## Style
The `orientation` property is used to set item orientation.
Possible values are `horizontal` (default) and `vertical`.
diff --git a/src/components/sbb-checkbox/readme.md b/src/components/sbb-checkbox/readme.md
index ddb73590197..14eea3f97fd 100644
--- a/src/components/sbb-checkbox/readme.md
+++ b/src/components/sbb-checkbox/readme.md
@@ -1,6 +1,6 @@
The `sbb-checkbox` component provides the same functionality as a native ` ` enhanced with the SBB Design.
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon` using
the `iconName` property or via custom SVG using the `icon` slot.
@@ -14,7 +14,7 @@ The icon can be placed before or after the label based on the value of the `icon
Icon at start
```
-### States
+## States
The component could be checked or not depending on the value of the `checked` attribute.
@@ -39,7 +39,7 @@ The component can be displayed in `disabled` or `required` state by using the se
Disabled
```
-### Style
+## Style
The component has two `size`, named `s` (default) and `m`.
@@ -47,7 +47,7 @@ The component has two `size`, named `s` (default) and `m`.
Size
```
-### Events
+## Events
Consumers can listen to the native `change` event on the `sbb-checkbox` component to intercept the input's change;
the current state can be read from `event.target.checked`, while the value from `event.target.value`.
diff --git a/src/components/sbb-chip/readme.md b/src/components/sbb-chip/readme.md
index 56434721d71..8448ccdf3a5 100644
--- a/src/components/sbb-chip/readme.md
+++ b/src/components/sbb-chip/readme.md
@@ -4,7 +4,7 @@ The `sbb-chip` is a visual component used to display compact information, like a
On sale
```
-### Style
+## Style
It's possible to choose among three different values for the `size` property (`s`, `xs` and `xxs`, which is the default),
and four different values for the `color` property (`charcoal`, `granite`, `white` and `milk`, which is the default).
diff --git a/src/components/sbb-datepicker-next-day/readme.md b/src/components/sbb-datepicker-next-day/readme.md
index 5588a127af9..8d7be29b8e7 100644
--- a/src/components/sbb-datepicker-next-day/readme.md
+++ b/src/components/sbb-datepicker-next-day/readme.md
@@ -11,7 +11,7 @@ or directly its reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the two components are used within a [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs),
they are automatically linked and the `sbb-datepicker-next-day` will be projected in the `suffix` slot of the `sbb-form-field`;
diff --git a/src/components/sbb-datepicker-previous-day/readme.md b/src/components/sbb-datepicker-previous-day/readme.md
index 6a224be3fa5..2636a0a8b61 100644
--- a/src/components/sbb-datepicker-previous-day/readme.md
+++ b/src/components/sbb-datepicker-previous-day/readme.md
@@ -11,7 +11,7 @@ or directly its reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the two components are used within a [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs),
they are automatically linked and the `sbb-datepicker-previous-day` will be projected in the `prefix` slot of the `sbb-form-field`;
diff --git a/src/components/sbb-datepicker-toggle/readme.md b/src/components/sbb-datepicker-toggle/readme.md
index d2c01ba0b0f..6049f0f81df 100644
--- a/src/components/sbb-datepicker-toggle/readme.md
+++ b/src/components/sbb-datepicker-toggle/readme.md
@@ -15,7 +15,7 @@ or directly its reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the two components are used within a [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs),
they are automatically linked and the `sbb-datepicker-toggle` will be projected in the `prefix` slot of the `sbb-form-field`;
diff --git a/src/components/sbb-datepicker/readme.md b/src/components/sbb-datepicker/readme.md
index b5151a138e9..d5e7b175de9 100644
--- a/src/components/sbb-datepicker/readme.md
+++ b/src/components/sbb-datepicker/readme.md
@@ -13,7 +13,7 @@ which accepts the id of the native input, or directly its reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the `sbb-datepicker` is used within a [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs) with a native input,
they are automatically linked; the component sets the input placeholder and the input's type as `text`,
@@ -42,7 +42,7 @@ It's also possible to display a two-months view using the `wide` property.
```
-### Events
+## Events
If the input's value changes, it is formatted then a `change` event is emitted with the new value.
If it's an invalid date, the `data-sbb-invalid` attribute is added to the input.
diff --git a/src/components/sbb-dialog/readme.md b/src/components/sbb-dialog/readme.md
index cdbf2ce82cf..c7890cc2be9 100644
--- a/src/components/sbb-dialog/readme.md
+++ b/src/components/sbb-dialog/readme.md
@@ -16,7 +16,7 @@ It offers the following features:
```
-### Slots
+## Slots
The content is projected in an unnamed slot, while the dialog's title can be provided via the `titleContent` property or via slot `name="title"`.
It's also possible to display buttons in the component's footer using the `action-group` slot with the `sbb-action-group` component.
@@ -44,7 +44,7 @@ It's also possible to display buttons in the component's footer using the `actio
```
-### Interaction
+## Interactions
In order to show the dialog, you need to call the `open(event?: PointerEvent)` method on the `sbb-dialog` component.
It is necessary to pass the event object to the `open()` method to allow the dialog to detect
@@ -75,7 +75,7 @@ or, if an element within the `sbb-dialog` has the `sbb-dialog-close` attribute,
You can also set the property `titleBackButton` to display the back button in the title section
(or content section, if title is omitted) which will emit the event `request-back-action` when clicked.
-### Style
+## Style
It's possible to display the component in `negative` variant using the self-named property.
diff --git a/src/components/sbb-divider/readme.md b/src/components/sbb-divider/readme.md
index 8c52ebb1e71..84a6ca307ed 100644
--- a/src/components/sbb-divider/readme.md
+++ b/src/components/sbb-divider/readme.md
@@ -1,6 +1,6 @@
The `sbb-divider` is used to visually divide sections.
-### Style
+## Style
Based on the `orientation` property, the `sbb-divider` can be displayed vertically or horizontally.
diff --git a/src/components/sbb-expansion-panel-content/readme.md b/src/components/sbb-expansion-panel-content/readme.md
index 807da7d5777..985f5ce6170 100644
--- a/src/components/sbb-expansion-panel-content/readme.md
+++ b/src/components/sbb-expansion-panel-content/readme.md
@@ -16,7 +16,7 @@ that needs to be displayed in a [sbb-expansion-panel](/docs/components-sbb-accor
```
-### Style
+## Style
When it's used in combination with a `sbb-expansion-panel-header` with an icon displayed via slot or `iconName` property,
the `sbb-expansion-panel-content` receives a padding on the left side in order to align it with the header label.
diff --git a/src/components/sbb-expansion-panel-header/readme.md b/src/components/sbb-expansion-panel-header/readme.md
index b934a9bb600..33a0ef24361 100644
--- a/src/components/sbb-expansion-panel-header/readme.md
+++ b/src/components/sbb-expansion-panel-header/readme.md
@@ -7,7 +7,7 @@ acting as a control for an expanding / collapsing content, like a native `Header
```
-### Slots
+## Slots
The component is internally rendered as a button, and it is possible to provide text via an unnamed slot.
On the left side, a toggle icon is displayed; it flips based on the host's `aria-expanded` property.
@@ -20,7 +20,7 @@ If using the SBB icons, the icon should be a medium size icon.
Header
```
-### States
+## States
The component can be displayed in `disabled` satte using the self-named property.
@@ -28,7 +28,7 @@ The component can be displayed in `disabled` satte using the self-named property
Header
```
-### Events
+## Events
When the element is clicked, the `toggle-expanded` event is emitted.
diff --git a/src/components/sbb-expansion-panel/readme.md b/src/components/sbb-expansion-panel/readme.md
index b1233df0961..604c840529f 100644
--- a/src/components/sbb-expansion-panel/readme.md
+++ b/src/components/sbb-expansion-panel/readme.md
@@ -2,7 +2,7 @@ The `sbb-expansion-panel` is a component which acts as an expandable summary-det
It can be used standalone or inside a [sbb-accordion](/docs/components-sbb-accordion-sbb-accordion--docs).
-### Slots
+## Slots
In order to correctly display the component, it must be used together with
a [sbb-expansion-panel-header](/docs/components-sbb-accordion-sbb-expansion-panel-header--docs)
@@ -18,7 +18,7 @@ These two components automatically fill the two available slots, named `header`
```
-### States
+## States
The visibility of the content is controlled by the value of the `expanded` property.
@@ -36,7 +36,7 @@ The `disabled` state can be set using the self-named variable. In this state, th
```
-### Style
+## Style
The component has two background options (`milk` and `white`, which is the default) that can be set using the `color` variable.
diff --git a/src/components/sbb-footer/readme.md b/src/components/sbb-footer/readme.md
index 253fd4dbe50..aaf8c389e08 100644
--- a/src/components/sbb-footer/readme.md
+++ b/src/components/sbb-footer/readme.md
@@ -1,7 +1,7 @@
The `sbb-footer` component is used to display page related information like copyright, contact or other
content related links; for these, the [sbb-link-list](/docs/components-sbb-link-list--docs) component can be used.
-### Variants
+## Variants
There are two variants of the footer: the `variant='default'`, which displays the slotted content in regular
block element approach and the `variant='clock-columns'`, which uses a css-grid for displaying the content over different
@@ -54,7 +54,7 @@ class (`class="sbb-link-list-button-group"`) to be displayed correctly.
```
-### Style
+## Style
It's possible to display the footer in `negative` variant; please also apply the negative attribute
to the content where needed (e.g. `sbb-link-list`, `sbb-link` and `sbb-divider`).
diff --git a/src/components/sbb-form-error/readme.md b/src/components/sbb-form-error/readme.md
index 3f5bc56cf81..90d0fc874cf 100644
--- a/src/components/sbb-form-error/readme.md
+++ b/src/components/sbb-form-error/readme.md
@@ -3,7 +3,7 @@ The `sbb-form-error` component can be used to provide an error message in inputs
[sbb-radio-button-group](/docs/components-sbb-radio-button-sbb-radio-button-group--docs),
or within the [sbb-form-field](/docs/components-sbb-form-field-sbb-form-field--docs).
-### Slots
+## Slots
It is possible to provide the error message via an unnamed slot;
the component displays an icon by default, that can be changed using the `icon` slot.
diff --git a/src/components/sbb-form-field/readme.md b/src/components/sbb-form-field/readme.md
index 0b39bafc253..f5b20df46c8 100644
--- a/src/components/sbb-form-field/readme.md
+++ b/src/components/sbb-form-field/readme.md
@@ -26,9 +26,9 @@ The following components are designed to work inside a `sbb-form-field`:
- [sbb-time-input](/docs/components-sbb-time-input--docs)
- [sbb-autocomplete](/docs/components-sbb-autocomplete--docs)
-### Slots
+## Slots
-#### Label
+### Label
Either use a `` or the `label` attribute to provide a label for a form input. The
`sbb-form-field` will automatically assign the correct id reference between label and input.
@@ -44,7 +44,7 @@ it's mandatory to call the `reset()` method of the `sbb-form-field` to update th
```
-#### Error messages
+### Error messages
Error messages can be shown under the form field by adding `sbb-form-error` elements inside the form field.
The component will automatically assign them to the `slot='error'`.
@@ -58,7 +58,7 @@ The component will automatically assign them to the `slot='error'`.
In order to avoid the layout from "jumping" when an error is shown, the option of setting `error-space="reserve"`
on the `sbb-form-field` will reserve space for a single line of an error message.
-#### Prefix & Suffix
+### Prefix & Suffix
It is possible to add content as a prefix or suffix in a `sbb-form-field`.
This can be done via the `prefix` and `suffix` slots.
@@ -76,7 +76,7 @@ Please refer to their documentation for more details.
```
-### Style
+## Style
By default, the component has a defined width and min-width. However, this behavior can be overridden by setting
the `width` property to `collapse`: in this way the component adapts its width to the inner slotted input component.
diff --git a/src/components/sbb-header-action/readme.md b/src/components/sbb-header-action/readme.md
index 8b2c06eaaf6..e0869812239 100644
--- a/src/components/sbb-header-action/readme.md
+++ b/src/components/sbb-header-action/readme.md
@@ -1,6 +1,6 @@
The component represents an action element contained by the [sbb-header](/docs/components-sbb-header-sbb-header--docs) component.
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -18,7 +18,7 @@ from which the label is displayed; below that, only the icon is visible.
Text
```
-### Link / button properties
+## Link / button properties
As the [sbb-link](/docs/components-sbb-link--docs) and the [sbb-button](/docs/components-sbb-button--docs),
the component can be internally rendered as a button or as a link,
diff --git a/src/components/sbb-header/readme.md b/src/components/sbb-header/readme.md
index b0b7031e3c6..55661ac35c8 100644
--- a/src/components/sbb-header/readme.md
+++ b/src/components/sbb-header/readme.md
@@ -1,6 +1,6 @@
The `sbb-header` component is a container for actions and a logo, and it is displayed at the top of the page.
-### Slots
+## Slots
It has two slots:
the first one can contain one or more [sbb-header-action](/docs/components-sbb-header-sbb-header-action--docs)
@@ -15,7 +15,7 @@ and it can contain a logo, which by default is the [sbb-logo](/docs/components-s
```
-### Style
+## Style
Setting the `expanded` property will cause the `sbb-header` component to take up the full width of the page.
@@ -27,7 +27,7 @@ With this, it's ensured that content will be visible all the time.
The default `z-index` of the component is set to `10`; to specify a custom stack order, the `z-index` can
be changed by defining the CSS variable `--sbb-header-z-index`.
-#### Positioning and visibility
+### Positioning and visibility
By default, the `sbb-header` has a fixed position at the top of the page;
when the page is scrolled down, a box-shadow appears below it and the component remains visible.
@@ -45,7 +45,7 @@ using the `scrollOrigin` property, which accepts an `HTMLElement` or the id of t
```
-#### Customizing
+### Customizing
Users can customize position and behaviour of actions inside the `sbb-header` component
by adding classes to `sbb-header-action` elements and then defining their own style rules.
diff --git a/src/components/sbb-journey-header/readme.md b/src/components/sbb-journey-header/readme.md
index 77f2f078206..8461e89cb11 100644
--- a/src/components/sbb-journey-header/readme.md
+++ b/src/components/sbb-journey-header/readme.md
@@ -11,7 +11,7 @@ the icon is an arrow pointing to the `destination`, otherwise it is a double arr
```
-### Style
+## Style
The component has a `level` property, which is passed to its inner `sbb-title` component;
it is rendered as a heading from `h1` to `h6`. Default `level` is `3`.
diff --git a/src/components/sbb-link-list/readme.md b/src/components/sbb-link-list/readme.md
index 16b9d1113fa..756665b7336 100644
--- a/src/components/sbb-link-list/readme.md
+++ b/src/components/sbb-link-list/readme.md
@@ -8,7 +8,7 @@ The `sbb-link-list` is a component that can be used to collect and display more
```
-### Slots
+## Slots
The component can display an optional title,
which is visually shown as a level-5 [sbb-title](/docs/components-sbb-title--docs)
@@ -22,7 +22,7 @@ The title can be set using the `titleContent` property or, alternatively, can be
```
-### Style
+## Style
The component will automatically set variant `block` on nested `sbb-link` instances,
and it will sync its `size` and `negative` property with the inner links.
@@ -35,7 +35,7 @@ and it will sync its `size` and `negative` property with the inner links.
```
-#### Orientation
+### Orientation
The `orientation` property is used to set links' orientation; possible values are `horizontal` and `vertical` (default).
The optional property `horizontalFrom` can be used in combination with `orientation='vertical'`
diff --git a/src/components/sbb-link/readme.md b/src/components/sbb-link/readme.md
index 5dd712de474..f24d598cc97 100644
--- a/src/components/sbb-link/readme.md
+++ b/src/components/sbb-link/readme.md
@@ -1,6 +1,6 @@
The `sbb-link` component provides the same functionality as a native `` enhanced with the SBB Design.
-### Slots
+## Slots
The link text is provided via an unnamed slot; the component can optionally display a `sbb-icon` using
the `iconName` property or via custom content using the `icon` slot.
@@ -16,7 +16,7 @@ By default, the icon is placed at the component's end, but this can be changed u
```
-### States
+## States
The component can be displayed in `disabled` state using the self-named property.
@@ -24,7 +24,7 @@ The component can be displayed in `disabled` state using the self-named property
Refunds
```
-### Link / button properties
+## Link / button properties
The component can be internally rendered as a button or as a link,
depending on the value of the `href` property, so the associated properties are available
@@ -43,7 +43,7 @@ it is internally rendered as a span in order to not break HTML functionality.
```
-### Style
+## Style
The component has two variants (`block`, which is the default, and `inline`), that can be set using the `variant` property,
and it has also three sizes (`xs`, `s`, which is the default, and `m`) that are relevant only in `variant='block`'.
diff --git a/src/components/sbb-logo/readme.md b/src/components/sbb-logo/readme.md
index 4434cd6068f..1c10da6c8ea 100644
--- a/src/components/sbb-logo/readme.md
+++ b/src/components/sbb-logo/readme.md
@@ -10,7 +10,7 @@ To use the component, please define the desired height or width on `sbb-logo`.
```
-### Style
+## Style
The component has a negative variant which can be set using the `negative` property.
diff --git a/src/components/sbb-map-container/readme.md b/src/components/sbb-map-container/readme.md
index 25fa0de1e49..eaa9cd4978f 100644
--- a/src/components/sbb-map-container/readme.md
+++ b/src/components/sbb-map-container/readme.md
@@ -1,6 +1,6 @@
This component is the layout container for the disruption map, the level 3 navigation and the future ATLAS.
-### Slots
+## Slots
It provides two slots: one unnamed slot for the sidebar content, and one named `map` for the map.
@@ -14,7 +14,7 @@ It provides two slots: one unnamed slot for the sidebar content, and one named `
On mobile, the map is sticky above the sidebar, and the sidebar content is scrolling over the map.
On desktop, the sidebar and the map are shown in a two column layout side by side.
-### Style
+## Style
The component comes along with a height calculation that subtracts the height of the header.
The header height can be overridden setting the variable `--sbb-map-container-margin-start`, if needed.
diff --git a/src/components/sbb-menu-action/readme.md b/src/components/sbb-menu-action/readme.md
index be2064ef70c..0f1740432de 100644
--- a/src/components/sbb-menu-action/readme.md
+++ b/src/components/sbb-menu-action/readme.md
@@ -1,6 +1,6 @@
The component represents an action element contained by the [sbb-menu](/docs/components-sbb-menu-sbb-menu--docs) component.
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -17,7 +17,7 @@ An amount can be rendered at the end of the action element as white text in a re
Amount text
```
-### Link / button properties
+## Link / button properties
As the [sbb-link](/docs/components-sbb-link--docs) and the [sbb-button](/docs/components-sbb-button--docs),
the component can be internally rendered as a button or as a link,
@@ -30,7 +30,7 @@ depending on the value of the `href` property, so the associated properties are
Button
```
-### Style
+## Style
For cases where smaller outer paddings are needed,
you can set the css variable `--sbb-menu-action-outer-horizontal-padding` to your desired outer padding.
diff --git a/src/components/sbb-menu/readme.md b/src/components/sbb-menu/readme.md
index 56da58a1d3b..0b08f990a3a 100644
--- a/src/components/sbb-menu/readme.md
+++ b/src/components/sbb-menu/readme.md
@@ -2,7 +2,7 @@ The `sbb-menu` is a component that can be attached to any element to open and di
which allows to perform actions relevant to the current task or to navigate within or outside the application
by using the [sbb-menu-action](/docs/components-sbb-menu-sbb-menu-action--docs) component along with it.
-### Interaction
+## Interactions
The element that will trigger the menu dialog must be set using the `trigger` property.
@@ -46,7 +46,7 @@ You can also provide custom content inside the `sbb-menu`:
```
-### Style
+## Style
If only `sbb-menu-action` components are provided, the items are automatically grouped within a list
using `` and `` items, for more complex scenarios the grouping must be done manually.
diff --git a/src/components/sbb-message/readme.md b/src/components/sbb-message/readme.md
index 5f929b6d8cc..7033612320b 100644
--- a/src/components/sbb-message/readme.md
+++ b/src/components/sbb-message/readme.md
@@ -1,6 +1,6 @@
The `sbb-message` component can be used to display a complex message.
-### Slots
+## Slots
It renders by default a [sbb-title](/docs/components-sbb-title--docs),
which can be provided via `titleContent` property or `title` slot.
diff --git a/src/components/sbb-navigation-action/readme.md b/src/components/sbb-navigation-action/readme.md
index 30e852a04a3..4c105cc93e5 100644
--- a/src/components/sbb-navigation-action/readme.md
+++ b/src/components/sbb-navigation-action/readme.md
@@ -2,7 +2,7 @@ The `sbb-navigation-action` component is an action element contained by
a [sbb-navigation-list](/docs/components-sbb-navigation-sbb-navigation-list--docs) component
or a [sbb-navigation-marker](/docs/components-sbb-navigation-sbb-navigation-marker--docs) component.
-### Link / button properties
+## Link / button properties
As the [sbb-link](/docs/components-sbb-link--docs) and the [sbb-button](/docs/components-sbb-button--docs),
the component can be internally rendered as a button or as a link,
@@ -15,7 +15,7 @@ depending on the value of the `href` property, so the associated properties are
Button
```
-### Style
+## Style
The component has three different sizes, which can be changed using the `size` property (`l`, which is the default, `m` and `s`).
diff --git a/src/components/sbb-navigation-marker/readme.md b/src/components/sbb-navigation-marker/readme.md
index 12be545f461..88303bff55a 100644
--- a/src/components/sbb-navigation-marker/readme.md
+++ b/src/components/sbb-navigation-marker/readme.md
@@ -9,7 +9,7 @@ Its intended use is inside a [sbb-navigation](/docs/components-sbb-navigation-sb
```
-### Style
+## Style
The component has a property named `size` which is proxied to all the `sbb-navigation-action` within it.
Possible values are `l` (default) and `s`.
diff --git a/src/components/sbb-navigation-section/readme.md b/src/components/sbb-navigation-section/readme.md
index 757b7556afe..894343b2964 100644
--- a/src/components/sbb-navigation-section/readme.md
+++ b/src/components/sbb-navigation-section/readme.md
@@ -1,7 +1,7 @@
The `sbb-navigation-section` is a container for both [sbb-navigation-list](../sbb-navigation-list/readme.md) and [sbb-button](../sbb-button/readme.md).
Its intended use is inside a [sbb-navigation](../sbb-navigation/readme.md) component, in which it can be seen as a 'second-level' panel.
-### Trigger
+## Trigger
To display the `sbb-navigation-section` component you must provide a trigger element using the `trigger` property,
Optionally a label can be provided via slot or via the `titleContent` property.
diff --git a/src/components/sbb-navigation/readme.md b/src/components/sbb-navigation/readme.md
index b93f5f40cd4..1641768c00d 100644
--- a/src/components/sbb-navigation/readme.md
+++ b/src/components/sbb-navigation/readme.md
@@ -10,7 +10,7 @@ Some of its features are:
[sbb-navigation-marker](/docs/components-sbb-navigation-sbb-navigation-marker--docs)
and [sbb-navigation-section](/docs/components-sbb-navigation-sbb-navigation-section--docs);
-### Interaction
+## Interactions
To display the `sbb-navigation` component you can either provide a trigger element using the `trigger` property,
or call the `open()` method on the `sbb-navigation` component.
@@ -48,7 +48,7 @@ or call the `open()` method on the `sbb-navigation` component.
```
-### Style
+## Style
The default `z-index` of the component is set to `1000`;
to specify a custom stack order, the `z-index` can be changed by defining the CSS variable `--sbb-navigation-z-index`.
diff --git a/src/components/sbb-notification/readme.md b/src/components/sbb-notification/readme.md
index 864d97a901c..efae3aab987 100644
--- a/src/components/sbb-notification/readme.md
+++ b/src/components/sbb-notification/readme.md
@@ -21,7 +21,7 @@ The `sbb-notification` is structured in the following way:
Note that the notification only supports inline links, therefore any slotted link will be forced to be a `variant="inline"` link.
-### States
+## States
It is possible to display the component in `readonly` state by using the self-named property.
In this case, the close button will not be shown.
@@ -32,7 +32,7 @@ In this case, the close button will not be shown.
```
-### Variants
+## Variants
The `sbb-notification` supports four types: `info` (default), `success`, `warn` and `error`, based on the type of the information displayed.
@@ -44,7 +44,7 @@ The `sbb-notification` supports four types: `info` (default), `success`, `warn`
...
```
-### Interaction
+## Interactions
Inline notifications do not dismiss automatically.
They persist on the page until the user dismisses them or takes action that resolves the notification.
@@ -52,7 +52,7 @@ They persist on the page until the user dismisses them or takes action that reso
By default, a close button is displayed to dismiss inline notifications. Including the close button is optional
and should not be included if it is critical for a user to read or interact with the notification by setting the `readonly` property to `true`.
-### Style
+## Style
If the `sbb-notification` host needs a margin, in order to properly animate it on open/close,
we suggest using the `--sbb-notification-margin` variable to set it.
diff --git a/src/components/sbb-optgroup/readme.md b/src/components/sbb-optgroup/readme.md
index aa4cfd690d5..29ac39abf44 100644
--- a/src/components/sbb-optgroup/readme.md
+++ b/src/components/sbb-optgroup/readme.md
@@ -4,7 +4,7 @@ or a [sbb-select](/docs/components-sbb-select--docs) component.
A [sbb-divider](/docs/components-sbb-divider--docs) is displayed at the bottom of the component.
-### Slots
+## Slots
It is possible to provide a set of `sbb-option` via an unnamed slot;
the component has also a `label` property as name of the group.
@@ -17,7 +17,7 @@ the component has also a `label` property as name of the group.
```
-### States
+## States
The component has a `disabled` property which sets all the `sbb-option` in the group as disabled.
diff --git a/src/components/sbb-option/readme.md b/src/components/sbb-option/readme.md
index 7490efaa2d1..af76196c7b6 100644
--- a/src/components/sbb-option/readme.md
+++ b/src/components/sbb-option/readme.md
@@ -1,7 +1,7 @@
The `sbb-option` is a component which can be used to display items in components like
[sbb-autocomplete](/docs/components-sbb-autocomplete--docs) or a [sbb-select](/docs/components-sbb-select--docs).
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -13,7 +13,7 @@ Icon space can be reserved even if the `iconName` property is not set by overrid
Option label
```
-### States
+## States
Like the native `option`, the component has a `value` property.
@@ -29,13 +29,13 @@ If the `sbb-option` is nested in a `sbb-optgroup` component, it inherits from th
Option label
```
-### Events
+## Events
Consumers can listen to the `optionSelected` event on the `sbb-option` component to intercept the selected value;
the event is triggered if the element has been selected by some user interaction. Alternatively,
the `selectionChange` event can be listened to, which is triggered if the element has been both selected or deselected.
-### Highlight
+## Style
If the label slot contains only a **text node**, it is possible to search for text in the `sbb-option` using the
`highlight` method, passing the desired text; if the text is present it will be highlighted in bold.
diff --git a/src/components/sbb-pearl-chain-vertical-item/readme.md b/src/components/sbb-pearl-chain-vertical-item/readme.md
index 914ebfd4dff..a8982048f3a 100644
--- a/src/components/sbb-pearl-chain-vertical-item/readme.md
+++ b/src/components/sbb-pearl-chain-vertical-item/readme.md
@@ -24,7 +24,7 @@ The `pearlChainVerticalItemAttributes` property is mandatory.
```
-### Style
+## Style
The component has many styling options, which can be configured through the 'pearlChainVerticalItemAttributes' property.
The slots themselves are unstyled, so that they can be used in various ways.
diff --git a/src/components/sbb-radio-button-group/readme.md b/src/components/sbb-radio-button-group/readme.md
index a3dc27d3411..8f6c5960374 100644
--- a/src/components/sbb-radio-button-group/readme.md
+++ b/src/components/sbb-radio-button-group/readme.md
@@ -11,14 +11,13 @@ or, alternatively, for a collection of [sbb-selection-panel](/docs/components-sb
```
-
Pressing a `sbb-radio-button` checks it and unchecks the previously selected one, if any.
They can also be controlled programmatically by setting the value property of the parent radio group to the value of the radio.
Please note that within a `sbb-radio-button-group`, only one `sbb-radio-button` can be selected at a time;
if you need to select more than one item, it is recommended to use the `sbb-checkbox-group` component.
-### States
+## States
The radio group can have different states:
@@ -47,7 +46,7 @@ enabling their deselection (by default, a selected `sbb-radio-button` cannot be
```
-### Style
+## Style
The `orientation` property is used to set item orientation. Possible values are `horizontal` (default) and `vertical`.
The optional property `horizontalFrom` can be used in combination with `orientation='vertical'` to
@@ -59,7 +58,7 @@ indicate the minimum breakpoint from which the orientation changes to `horizonta
```
-### Events
+## Events
Consumers can listen to the native `change`/`input` event on the `sbb-radio-button-group` component
to intercept the selection's change; the current value can be read from `event.detail.value`.
diff --git a/src/components/sbb-radio-button/readme.md b/src/components/sbb-radio-button/readme.md
index 3419ee9e37b..777e329f963 100644
--- a/src/components/sbb-radio-button/readme.md
+++ b/src/components/sbb-radio-button/readme.md
@@ -10,7 +10,7 @@ in order to display a radio input within a group.
```
-### States
+## States
It is possible to display the component in `disabled` or `checked` state by using the self-named properties.
@@ -30,7 +30,7 @@ The `allowEmptySelection` property allows user to deselect the component.
Option four
```
-### Style
+## Style
The component has two different sizes, which can be changed using the `size` property (`m`, which is the default, and `s`).
diff --git a/src/components/sbb-select/readme.md b/src/components/sbb-select/readme.md
index 1515658e2d7..97e6f68a617 100644
--- a/src/components/sbb-select/readme.md
+++ b/src/components/sbb-select/readme.md
@@ -1,7 +1,7 @@
The `sbb-select` is a component which provides a list of selectable options in an overlay panel,
emulating the behaviour of a native ``.
-### In `sbb-form-field`
+## In `sbb-form-field`
If the component is used within a `sbb-form-field`, it will automatically display the option panel above or below it;
otherwise, the panel takes the component's parent element as origin.
@@ -26,7 +26,7 @@ Also note that if the `value` is set on the `sbb-select`, it will override all t
so setting a default value should be done using the `value` attribute on the `sbb-select` and not by setting the
`selected` attribute on the internal `sbb-option`s.
-### States
+## States
It is possible to display the component in `disabled` or `readonly` state by using the self-named properties. The component
has a `required` property, which can be useful for setting a custom `sbb-form-error` message within a `sbb-form-field`.
@@ -42,7 +42,7 @@ has a `required` property, which can be useful for setting a custom `sbb-form-er
```
-#### Multiple
+### Multiple
If the `multiple` property is set to false, only one option can be selected:
in this case the placeholder will be replaced by the chosen value and a check mark will appear
@@ -67,13 +67,13 @@ the selected values will be displayed in selection order, separated by a comma.
```
-### Events
+## Events
Consumers can listen to the native `change`/`input` event on the `sbb-select` component to intercept the selection's change;
the current value can be read from `event.target.value`.
Additionally `sbb-option` will emit `option-selected` when selected via user interaction.
-### Keyboard interaction
+## Keyboard interaction
Closed panel, `sbb-select` has focus:
diff --git a/src/components/sbb-selection-panel/readme.md b/src/components/sbb-selection-panel/readme.md
index 18b69a49924..5d88d86a02d 100644
--- a/src/components/sbb-selection-panel/readme.md
+++ b/src/components/sbb-selection-panel/readme.md
@@ -8,7 +8,7 @@ clicking on the content area does not toggle anything.
The selection panel can also be used inside a [sbb-radio-button-group](/docs/components-sbb-radio-button-sbb-radio-button-group--docs)
or a [sbb-checkbox-group](/docs/components-sbb-checkbox-sbb-checkbox-group--docs).
-#### With `sbb-radio-button-group`
+### With `sbb-radio-button-group`
```html
@@ -34,7 +34,7 @@ or a [sbb-checkbox-group](/docs/components-sbb-checkbox-sbb-checkbox-group--docs
```
-#### With `sbb-checkbox-group`
+### With `sbb-checkbox-group`
```html
@@ -63,7 +63,7 @@ or a [sbb-checkbox-group](/docs/components-sbb-checkbox-sbb-checkbox-group--docs
As shown in the examples above, `sbb-checkbox` and `sbb-radio-button` placed in a `sbb-selection-panel` are extended
with a slot named `subtext` for the subtext and a slot named `suffix` for the suffix items.
-### Style
+## Style
The component has two background options that can be set using the `color` variable: `milk` and `white` (default).
diff --git a/src/components/sbb-signet/readme.md b/src/components/sbb-signet/readme.md
index f3157f64410..67e2ff8b5be 100644
--- a/src/components/sbb-signet/readme.md
+++ b/src/components/sbb-signet/readme.md
@@ -10,7 +10,7 @@ To use the component, please define the desired height or width on `sbb-signet`.
```
-### Style
+## Style
The aspect ratio of the logo can be changed using the `protectiveRoom` property.
Possible values are `ideal` (default), `minimal` and `none`.
diff --git a/src/components/sbb-skiplink-list/readme.md b/src/components/sbb-skiplink-list/readme.md
index 182f8ff6dbe..3a9bb9129cf 100644
--- a/src/components/sbb-skiplink-list/readme.md
+++ b/src/components/sbb-skiplink-list/readme.md
@@ -14,7 +14,7 @@ and it can be set using the `title-content` property.
```
-### Style
+## Style
The default `z-index` of the component is set to `1000`;
to specify a custom stack order, the `z-index` can be changed by defining the CSS variable `--sbb-skiplink-z-index`.
diff --git a/src/components/sbb-slider/readme.md b/src/components/sbb-slider/readme.md
index 5113977773f..4f36b19aef8 100644
--- a/src/components/sbb-slider/readme.md
+++ b/src/components/sbb-slider/readme.md
@@ -10,7 +10,7 @@ If no value is provided, by default it is set halfway between the minimum and ma
```
-### In `sbb-form-field`
+## In `sbb-form-field`
The component can be used within a `sbb-form-field` component.
@@ -20,7 +20,7 @@ The component can be used within a `sbb-form-field` component.
```
-### Slots
+## Slots
The component can optionally display two `sbb-icon`s at either end;
consumers could set one/both of them using the `startIcon` and `endIcon` properties,
@@ -35,7 +35,7 @@ or can provide their own using the two slots named `prefix` and `suffix`.
```
-### States
+## States
It is possible to display the component in `disabled` or `readonly` state by using the self-named properties.
@@ -45,12 +45,12 @@ It is possible to display the component in `disabled` or `readonly` state by usi
```
-### Events
+## Events
Consumers can listen to the native `change` event on the `sbb-slider` component to intercept the input's change `event`;
the current value can be read from `event.target.value` or `event.target.valueAsNumber`.
-### Keyboard interaction
+## Keyboard interaction
The `sbb-slider` has the following behaviour on keypress when focused:
diff --git a/src/components/sbb-tab-group/readme.md b/src/components/sbb-tab-group/readme.md
index 177a86073fc..71d15d04740 100644
--- a/src/components/sbb-tab-group/readme.md
+++ b/src/components/sbb-tab-group/readme.md
@@ -25,7 +25,7 @@ please refer to the [sbb-tab-title](/docs/components-sbb-tab-sbb-tab-title--docs
Tab groups can also be nested, which means that a tab's content block can be represented by another `sbb-tab-group`,
as shown in the "Nested Tab Groups" example.
-### States
+## States
A tab can be selected, unselected, or in `disabled` state; disable a tab to mark it as unavailable.
Disabled tabs cannot be focused and may be invisible to assistive technologies such as screen readers.
diff --git a/src/components/sbb-tab-title/readme.md b/src/components/sbb-tab-title/readme.md
index e7182ba59e5..ffe3d3c8098 100644
--- a/src/components/sbb-tab-title/readme.md
+++ b/src/components/sbb-tab-title/readme.md
@@ -6,7 +6,7 @@ in order to display a tab label within the tab bar.
Tab Label
```
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -27,7 +27,7 @@ The label's heading tag can be changed using the `level` property.
```
-### States
+## States
It is possible to display the component in `disabled` state by using the self-named property.
diff --git a/src/components/sbb-tag-group/readme.md b/src/components/sbb-tag-group/readme.md
index 39d8f8d9cdb..ed87ad093b5 100644
--- a/src/components/sbb-tag-group/readme.md
+++ b/src/components/sbb-tag-group/readme.md
@@ -13,9 +13,9 @@ See [its documentation]((/docs/components-sbb-tag-sbb-tag--docs)) for more detai
```
-### Interaction
+## Interactions
-#### Exclusive selection vs. multiple selection
+### Exclusive selection vs. multiple selection
By default, `sbb-tag-group` acts like a radio-button group: only one item can be selected.
In this mode, the value of the `sbb-tag-group` will reflect the value of the selected `sbb-tag`.
@@ -32,12 +32,12 @@ In this mode the value of the `sbb-tag-group` is an array containing all values
```
-#### Changing multiple property during run time
+### Changing multiple property during run time
There is no support for changing multiple mode during run time (e.g., update value automatically).
So this flag should be provided at component's instantiation time.
-#### Advanced usage: multiple and exclusive mixed
+### Advanced usage: multiple and exclusive mixed
```ts
const uncheckAllTag = () => {
diff --git a/src/components/sbb-tag/readme.md b/src/components/sbb-tag/readme.md
index b8852c9b07c..8f0c34b7662 100644
--- a/src/components/sbb-tag/readme.md
+++ b/src/components/sbb-tag/readme.md
@@ -5,7 +5,7 @@ It's intended to be used inside the [sbb-tag-group](/docs/components-sbb-tag-sbb
All
```
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -24,7 +24,7 @@ It's also possible to display a numeric amount at the component's end using the
```
-### States
+## States
The component can be displayed in `checked` or `disabled` state using the self-named property.
@@ -34,7 +34,7 @@ The component can be displayed in `checked` or `disabled` state using the self-n
All
```
-### Events
+## Events
Consumers can listen to the native `change` and `input` events on the `sbb-tag`.
The current state can be read from `event.target.checked`, while the value from `event.target.value`.
diff --git a/src/components/sbb-teaser-hero/readme.md b/src/components/sbb-teaser-hero/readme.md
index 5cb75090558..d59c850cc57 100644
--- a/src/components/sbb-teaser-hero/readme.md
+++ b/src/components/sbb-teaser-hero/readme.md
@@ -1,7 +1,7 @@
The `sbb-teaser-hero` is a component with a background image and an action call within a panel;
it should be an eye-catcher and should have an emotional effect on the user with its large image component.
-### Slots
+## Slots
It is possible to provide the panel label via an unnamed slot,
while the link text can be provided using the `link-content` slot or the `linkContent` property;
diff --git a/src/components/sbb-teaser/readme.md b/src/components/sbb-teaser/readme.md
index 79b5bfc3507..4a9f50bfd8e 100644
--- a/src/components/sbb-teaser/readme.md
+++ b/src/components/sbb-teaser/readme.md
@@ -1,6 +1,6 @@
The `sbb-teaser` is a component which can display an image with a caption, and it behaves like a link on user interaction.
-### Slots
+## Slots
The component displays the `image`, the `title` and the `description` in the self-named slots.
diff --git a/src/components/sbb-time-input/readme.md b/src/components/sbb-time-input/readme.md
index ca21494684b..240b90c0f5c 100644
--- a/src/components/sbb-time-input/readme.md
+++ b/src/components/sbb-time-input/readme.md
@@ -11,7 +11,7 @@ which accepts the id of the native input, or directly its reference.
```
-### In `sbb-form-field`
+## In `sbb-form-field`
If the `sbb-time-input` is used within a `sbb-form-field` with a native input, they are automatically linked.
@@ -33,7 +33,7 @@ e.g.: with a value of `12:34`, the `getValueAsDate()` will be 01.01.1970, 12:34:
If the value is invalid because not real (e.g. 12:61 or 25:30), the component does not format the `value`,
and will return `null` if `getValueAsDate()` was called.
-### Format example
+## Format example
See the table below for some formatting examples:
diff --git a/src/components/sbb-title/readme.md b/src/components/sbb-title/readme.md
index 575742745bb..5dd74f5bc10 100644
--- a/src/components/sbb-title/readme.md
+++ b/src/components/sbb-title/readme.md
@@ -4,6 +4,8 @@ The `sbb-title` is a component which renders a heading element according to the
Hello
```
+## Style
+
In scenarios where the visual representation needs to be different from the semantic meaning of the title level,
it is possible to use the `visualLevel` property.
The available values for both `level` and `visualLevel` are the numbers from 1 to 6 (`h1` to `h6`).
@@ -12,21 +14,21 @@ The available values for both `level` and `visualLevel` are the numbers from 1 t
Hi!
```
-If the title is needed, but it must to not be displayed, it's possible to use the `visuallyHidden` property to hide it.
+The component has a `negative` variant which can be set with the self-named property.
```html
-Screen-reader only.
+Negative
```
-### Style
-
-As a default the `sbb-title` contains spacing on top and bottom on the host.
+As a default the `sbb-title` contains spacing on top and bottom on the host.
This can be removed or customized via simple CSS rules.
-The component has a `negative` variant which can be set with the self-named property.
+## Accessibility
+
+If the title is needed, but it must to not be displayed, it's possible to use the `visuallyHidden` property to hide it.
```html
-Negative
+Screen-reader only.
```
diff --git a/src/components/sbb-toast/readme.md b/src/components/sbb-toast/readme.md
index ef0d8ed98c9..577632c094d 100644
--- a/src/components/sbb-toast/readme.md
+++ b/src/components/sbb-toast/readme.md
@@ -10,7 +10,7 @@ if a new `sbb-toast` is opened while a previous message is still showing, the ol
Toast content
```
-### Important note
+## Important note
You should carefully consider every use of the `sbb-toast` component since it can be a source of stress for people with visual impairments
(see the ["Accessibility"](#accessibility) section for more info).
@@ -20,7 +20,7 @@ Here are a few tips for correct usage:
* If an action is needed, you should provide an alternative way to perform it;
* If not strictly necessary, use the `polite` (_default_) configuration since it is less aggressive for screen-reader users.
-### Slots
+## Slots
It is possible to provide a text via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -47,7 +47,7 @@ A `sbb-toast` can also be given a custom action that, if marked with the `sbb-to
```
-### Style
+## Style
If the `dismissible` property is set to true, a close button is displayed at the component end.
The time before the component auto-closing can be set with the `timeout` property (in milliseconds, default is 6000).
diff --git a/src/components/sbb-toggle-check/readme.md b/src/components/sbb-toggle-check/readme.md
index 11a002a58a7..a92fe827491 100644
--- a/src/components/sbb-toggle-check/readme.md
+++ b/src/components/sbb-toggle-check/readme.md
@@ -5,7 +5,7 @@ enhanced with the SBB Design.
Example
```
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
using the `iconName` property or via custom content using the `icon` slot.
@@ -21,7 +21,7 @@ The icon can be at the component start or end based on the value of the `labelPo
```
-### States
+## States
The component can be displayed in `checked` or `disabled` states using the self-named properties.
@@ -31,7 +31,7 @@ The component can be displayed in `checked` or `disabled` states using the self-
Option
```
-### Events
+## Events
Consumers can listen to the native `change` event on the `sbb-toggle-check` component to intercept the input's change;
the current state can be read from `event.target.checked` and the value from `event.target.value`.
diff --git a/src/components/sbb-toggle-option/readme.md b/src/components/sbb-toggle-option/readme.md
index f7b39ec5760..88543393161 100644
--- a/src/components/sbb-toggle-option/readme.md
+++ b/src/components/sbb-toggle-option/readme.md
@@ -5,7 +5,7 @@ The `sbb-toggle-option` component is used inside the
Option
```
-### Slots
+## Slots
It is possible to provide a label via an unnamed slot; the component can optionally display a `sbb-icon`
at the component start using the `iconName` property or via custom content using the `icon` slot.
@@ -17,7 +17,7 @@ Text and icon are not exclusive and can be used together.
Option
```
-### States
+## States
The component can be displayed in `checked` or `disabled` states using the self-named properties.
diff --git a/src/components/sbb-toggle/readme.md b/src/components/sbb-toggle/readme.md
index 5c84676f16d..5b73bfa6eaf 100644
--- a/src/components/sbb-toggle/readme.md
+++ b/src/components/sbb-toggle/readme.md
@@ -12,7 +12,7 @@ where selecting an option deselects the previously selected one.
```
-### States
+## States
The component can be displayed in `disabled` state using the self-named property.
@@ -22,7 +22,7 @@ The component can be displayed in `disabled` state using the self-named property
```
-### Style
+## Style
The `even` property can be used to let the component expand to the parent component or adapt to the label's width.
diff --git a/src/components/sbb-tooltip-trigger/readme.md b/src/components/sbb-tooltip-trigger/readme.md
index c173b07750b..c231a08fb55 100644
--- a/src/components/sbb-tooltip-trigger/readme.md
+++ b/src/components/sbb-tooltip-trigger/readme.md
@@ -9,7 +9,7 @@ by pressing or hovering on it.
```
-### Slots
+## Slots
By default, it renders the `sbb-icon` named `information-circle-small`;
it is possible to define a custom icon with the property `iconName`.
@@ -32,7 +32,7 @@ Moreover, it is possible to override the `sbb-icon` with custom content by slott
```
-### State
+## State
It is possible to display the component in `disabled` state by using the self-named properties.
diff --git a/src/components/sbb-tooltip/readme.md b/src/components/sbb-tooltip/readme.md
index 713977cde75..97dda54aeef 100644
--- a/src/components/sbb-tooltip/readme.md
+++ b/src/components/sbb-tooltip/readme.md
@@ -19,7 +19,7 @@ the [sbb-tooltip-trigger](/docs/components-sbb-tooltip-sbb-tooltip-trigger--docs
```
-### Interaction
+## Interactions
The `sbb-tooltip` can be dismissed by clicking on an interactive element within its content,
by clicking on the close button or by performing another action on the page.
@@ -56,7 +56,7 @@ if neither the trigger element nor the tooltip are on hover or if another action
```
-### Style
+## Style
The `sbb-tooltip` automatically calculates where it should place itself, based on available space. Default is below and center.
The default `z-index` of the component is set to `1000`;
diff --git a/src/components/sbb-train-formation/readme.md b/src/components/sbb-train-formation/readme.md
index bc8ff1cb1bc..9884edad8f9 100644
--- a/src/components/sbb-train-formation/readme.md
+++ b/src/components/sbb-train-formation/readme.md
@@ -1,7 +1,7 @@
The `sbb-train-formation` is a component used as a top container element
for wrapping [sbb-train](/docs/timetable-sbb-train--docs)s.
-### Style
+## Style
It has no properties, and it applies the possible scrollable-width to every given `sbb-train`
as CSS variable (`--sbb-train-direction-width`) initially and on resize.
diff --git a/src/components/sbb-train-wagon/readme.md b/src/components/sbb-train-wagon/readme.md
index f1786884142..48d637bf44d 100644
--- a/src/components/sbb-train-wagon/readme.md
+++ b/src/components/sbb-train-wagon/readme.md
@@ -2,7 +2,7 @@ THe `sbb-train-wagon` is a component which represents a train compartment.
It is used inside the [sbb-train](/docs/timetable-sbb-train--docs) element.
-### Variants
+## Variants
The component can visualize a locomotive or a wagon (possibly closed),
so it has three different variants, based on the value of the `type` property.
diff --git a/src/components/sbb-visual-checkbox/readme.md b/src/components/sbb-visual-checkbox/readme.md
index 19aa3810da3..7c3d8670713 100644
--- a/src/components/sbb-visual-checkbox/readme.md
+++ b/src/components/sbb-visual-checkbox/readme.md
@@ -3,7 +3,7 @@ It is used in the [sbb-checkbox](/docs/components-sbb-checkbox-sbb-checkbox--doc
and in the [sbb-option](/docs/components-sbb-option-sbb-option--docs) component
when it's used within a multiple [sbb-select](/docs/components-sbb-select--docs).
-### States
+## States
It has four different states related to the properties `checked`, `indeterminate` and `disabled`:
- a default unchecked state: an empty square is shown;