ember-cli-mdc-segmented-button

3.0.17 • Public • Published

ember-cli-mdc-segmented-button

ember-cli addon for @material/segmented-button

Installation

ember install ember-cli-mdc-segmented-button

Styles

@use "@material/segmented-button" as segmented

Multi-select Segmented Button

The <MdcSegmentedButton /> component is multi-select by default. You just add one or more <MdcSegmentedButtonSegment /> components to the <MdcSegmentedButton /> component.

<MdcSegmentedButton>
    <MdcSegmentedButtonSegment @icon="favorite" />
    <MdcSegmentedButtonSegment @label="Sample Text" />
    <MdcSegmentedButtonSegment @icon="favorite" @label="Sample Text" />
</MdcSegmentedButton>

Single-select Segmented Button

Set the @singleSelect={{true}} attribute to create a single-select segmented button.

You must set the @selected attribute on one of the <MdcSegmentedButtonSegment /> components, or the first <MdcSegmentedButtonSegment /> component will be automatically selected.

  <MdcSegmentedButton @singleSelect={{true}}>
    <MdcSegmentedButtonSegment @icon="favorite" />
    <MdcSegmentedButtonSegment @label="Sample Text" />
    <MdcSegmentedButtonSegment @icon="favorite" @label="Sample Text" />
</MdcSegmentedButton>

Package Sidebar

Install

npm i ember-cli-mdc-segmented-button

Weekly Downloads

0

Version

3.0.17

License

Apache-2.0

Unpacked Size

18.7 kB

Total Files

11

Last publish

Collaborators

  • onehilltech