1.6.0 • Published 1 year ago
@forter/segmented-control v1.6.0
fc-segmented-control
An element by Forter
Usage
<script>
import '@forter/segmented-control';
</script>
<fc-segmented-control options=[{"value":"Coral","label":"Coral"},{"value":"Itzik","label":"Itzik"},{"value":"Ghost","label":"Ghost","default":true},{"value":"Nala","label":"Nala","disabled":true}]>
</fc-segmented-control>
<!-- Preset with no default -->
<fc-segmented-control required options=[{"value":"Coral","label":"Coral"},{"value":"Itzik","label":"Itzik"},{"value":"Ghost","label":"Ghost"},{"value":"Nala","label":"Nala","disabled":true}]>
</fc-segmented-control>
## Properties
| Property | Attribute | Type | Default | Description |
|------------|------------|-----------|--------------------|--------------------------------------------------|
| `disabled` | `disabled` | `boolean` | false | |
| `icon` | | `any` | | |
| `label` | `label` | `string` | "" | |
| `name` | `name` | `string` | "segmentedControl" | The name of all the radio buttons in the same radio group |
| `options` | `options` | `any[]` | | |
| `required` | `required` | `boolean` | false | |
| `value` | `value` | `string` | "" | |
## Events
| Event | Description |
|----------|--------------------------------------------------|
| `change` | event when the segmented control value is changed |