ChipGroup
A chip group component.
Importing
ts
import "@tapsioss/web-components/chip-group";
ts
import { ChipGroup } from "@tapsioss/react-components/ChipGroup";
Component Usage
html
<tapsi-chip-group></tapsi-chip-group>
tsx
<ChipGroup />
Properties
Name | Description | Type | Default Value |
---|---|---|---|
select-mode | The select mode of the chip group. | "single" | "multiple" | "multiple" |
orientation | The orientation of the chip group. | "horizontal" | "vertical" | "horizontal" |
label | Defines a string value that can be used to set a label for assistive technologies. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label | string | "" |
Slots
Name | Description |
---|---|
- | The default slot for chips. |
TIP
You can use slot names as variables:
ts
import { Slots } from "@tapsioss/web-components/chip-group";
console.log(Slots.DEFAULT); // ""
ts
import { ChipGroupSlots } from "@tapsioss/react-components";
console.log(ChipGroupSlots.DEFAULT); // ""
Events
Name | Description | Type |
---|---|---|
selectchange | Fired when the chip selection state changes. (Bubbles). | SelectChangeEvent |
TIP
You can import custom event names:
ts
import {
SelectChangeEvent
} from "@tapsioss/web-components/chip-group";
element.addEventListener(SelectChangeEvent.type, handleTapsiChipGroupSelectChange);
tsx
import {
ChipGroupSelectChangeEvent
} from "@tapsioss/react-components";
// ...
<ChipGroup
onSelectChangeEvent={(e: ChipGroupSelectChangeEvent) => {...}}
/>