Das Selection-Action-Panel verbindet ein Checkbox-Panel oder ein Radio-Button-Panel mit einer Aktion, z.B. einem Button. So können Nutzende eine Option auswählen und direkt eine zugehörige Aktion auslösen.
The <sbb-selection-action-panel> component wraps either a sbb-checkbox-panel
or a sbb-radio-button-panel and an action element (e.g. an <sbb-secondary-button> or a native button).
<sbb-selection-action-panel>
<sbb-radio-button-panel>
Value
<span slot="subtext">Subtext</span>
</sbb-radio-button-panel>
<!-- action -->
<sbb-secondary-button icon-name="arrow-right-small">...</sbb-secondary-button>
<!-- or -->
<button class="sbb-action">...</button>
</sbb-selection-action-panel>
It is possible to combine the usage of the <sbb-selection-action-panel> and the sbb-selection-expansion-panel.
<sbb-selection-expansion-panel>
<sbb-selection-action-panel>
<sbb-radio-button-panel color="milk" borderless>
Value
<span slot="subtext">Subtext</span>
</sbb-radio-button-panel>
<sbb-secondary-button icon-name="arrow-right-small">...</sbb-secondary-button>
</sbb-selection-action-panel>
<!-- inner content -->
<div slot="content">Inner Content</div>
</sbb-selection-expansion-panel>
The selection panel can also be used inside a sbb-radio-button-group
or a sbb-checkbox-group.
With <sbb-radio-button-group>:
<sbb-radio-button-group>
<sbb-selection-action-panel>
<sbb-radio-button-panel>
Value
<span slot="subtext">Subtext</span>
</sbb-radio-button-panel>
<sbb-secondary-button icon-name="arrow-right-small"></sbb-secondary-button>
<sbb-card-badge>%</sbb-card-badge>
</sbb-selection-action-panel>
...
</sbb-radio-button-group>
With <sbb-checkbox-group>:
<sbb-checkbox-group>
<sbb-selection-action-panel>
<sbb-checkbox-panel>
Value
<span slot="subtext">Subtext</span>
</sbb-checkbox-panel>
<sbb-secondary-button icon-name="arrow-right-small"></sbb-secondary-button>
<sbb-card-badge>%</sbb-card-badge>
</sbb-selection-action-panel>
...
</sbb-checkbox-group>
The component inherits its style from the slotted panel component (<sbb-checkbox-panel> or <sbb-radio-button-panel>).
Diese Komponente gibt es auch für Angular im Paket @sbb-esta/lyne-angular.
SbbSelectionActionPanelElement, sbb-selection-action-panel.| Name | Attribute | Privacy | Type | Default | Description |
|---|---|---|---|---|---|
group | - | public | SbbRadioButtonGroupElement | SbbCheckboxGroupElement | null | Group element if present | |
panel | - | public | SbbCheckboxPanelElement | SbbRadioButtonPanelElement | null | Input panel element |
| Name | Description |
|---|---|
Use this slot to render a sbb-checkbox-panel or sbb-radio-button-panel element and the action element. | |
badge | Use this slot to render a sbb-card-badge component. |