1.7.0 • Published 3 years ago

@forter/button-group v1.7.0

Weekly downloads
160
License
Apache-2.0
Repository
github
Last release
3 years ago

fc-button-group

A group of buttons

Usage

<script>
   import '@forter/button-group';
</script>

<fc-button-group>
      <button>Dog</button>
      <button>Cat</button>
      <button>Human <fc-icon icon="user" size="13"></fc-icon></button>
      <button>Fish</button>
</fc-button-group>

Examples

<!-- with 2 button buttons -->

<fc-button-group>
      <button>Dog</button>
      <button>Cat</button>
</fc-button-group>

<!-- with active and disabled buttons -->

<fc-button-group>
      <button>Dog</button>
      <button active>Cat</button>
      <button>Human <fc-icon icon="user" size="13"></fc-icon></button>
      <button disabled>Fish</button>
</fc-button-group>

<!-- disabled group and selected item -->

<fc-button-group disabled>
      <button>Dog</button>
      <button active>Cat</button>
      <button>Human</button>
      <button>Fish</button>
</fc-button-group>

<!-- all items disabled and one active -->

<fc-button-group>
      <button disabled>Dog</button>
      <button disabled active>Cat</button>
      <button disabled>Human</button>
      <button disabled>Fish</button>
</fc-button-group>

<!-- single-selection -->

<fc-button-group single-selection >
      <button>Dog</button>
      <button active>Cat</button>
      <button>Human <fc-icon icon="user" size="13"></fc-icon></button>
      <button>Fish</button>
</fc-button-group>

Properties

PropertyAttributeTypeDefaultDescription
disableddisabledbooleanfalseIf the element is disabled
expendableexpendablebooleanfalseIf the element is expendable
getComputedStylestring \| 0
onWindowResizeany
singleSelectionsingle-selectionbooleanAllow only one option selection

Events

EventDescription
changewhen button is clicked

CSS Custom Properties

PropertyDescription
--fc-button-group-button-background-colorbutton's background-color. default: 'white'
--fc-button-group-button-background-color-color-activebutton's background-color on active. default: 'var(--fc-blue-100)'
--fc-button-group-button-border-colorbutton's border-color. default: 'var(--fc-gray-400)'
--fc-button-group-button-border-color-activebutton's border-color on active. default: 'var(--fc-blue-500)'
--fc-button-group-button-border-color-hoverbutton's border-color on hover. default: 'var(--fc-gray-700)'
--fc-button-group-button-border-radiusfirst and last button border radius. default: '25px'
--fc-button-group-button-colorfont color. default: 'var(--fc-gray-700)'
--fc-button-group-button-color-activefont color. default: 'var(--fc-gray-700)'
--fc-button-group-button-font-sizebutton's font-size. default: '12px'
--fc-button-group-button-heightbutton's height. default: '30px'
--fc-button-group-button-inner-item-paddingbutton's inner left and right padding. default: '20px'
1.7.0

3 years ago

1.6.4

3 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

5 years ago

1.5.7

5 years ago

1.5.6

5 years ago

1.5.5

5 years ago

1.5.4

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.13

5 years ago

1.4.12

5 years ago

1.4.11

5 years ago

1.4.10

5 years ago

1.4.9

5 years ago

1.4.8

5 years ago

1.4.7

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.13

5 years ago

1.3.14

5 years ago

1.3.12

5 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.39

5 years ago

1.2.38

5 years ago

1.2.37

5 years ago

1.2.35

5 years ago

1.2.36

5 years ago

1.2.34

5 years ago

1.2.33

5 years ago

1.2.32

5 years ago

1.2.30

5 years ago

1.2.31

5 years ago

1.2.29

5 years ago

1.2.28

5 years ago

1.2.27

5 years ago

1.2.26

5 years ago

1.2.25

5 years ago

1.2.24

5 years ago

1.2.23

5 years ago

1.2.22

5 years ago

1.2.21

5 years ago

1.2.20

5 years ago

1.2.19

5 years ago

1.2.18

5 years ago

1.2.17

5 years ago

1.2.16

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.12

6 years ago

1.2.10

6 years ago

1.2.11

6 years ago

1.2.9

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.1.0

6 years ago