1.7.0 • Published 2 years ago

@forter/button-group v1.7.0

Weekly downloads
160
License
Apache-2.0
Repository
github
Last release
2 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

2 years ago

1.6.4

2 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.13

4 years ago

1.4.12

4 years ago

1.4.11

4 years ago

1.4.10

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.4.7

4 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.13

4 years ago

1.3.14

4 years ago

1.3.12

4 years ago

1.3.11

4 years ago

1.3.10

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.39

4 years ago

1.2.38

4 years ago

1.2.37

4 years ago

1.2.35

4 years ago

1.2.36

4 years ago

1.2.34

4 years ago

1.2.33

4 years ago

1.2.32

4 years ago

1.2.30

4 years ago

1.2.31

4 years ago

1.2.29

4 years ago

1.2.28

4 years ago

1.2.27

4 years ago

1.2.26

4 years ago

1.2.25

4 years ago

1.2.24

4 years ago

1.2.23

4 years ago

1.2.22

4 years ago

1.2.21

4 years ago

1.2.20

4 years ago

1.2.19

4 years ago

1.2.18

4 years ago

1.2.17

4 years ago

1.2.16

4 years ago

1.2.15

4 years ago

1.2.14

4 years ago

1.2.13

4 years ago

1.2.12

4 years ago

1.2.10

4 years ago

1.2.11

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago