Selection
@xngui/cdk/selection@xngui/cdk/selectionSingle / multi selection model for lists and tables.
Preview
Multi-select table
Selected 0 of 6
| Name | Role | |
|---|---|---|
| Ava Chen | Engineer | |
| Liam Garcia | Designer | |
| Noah Smith | Product Manager | |
| Mia Patel | Analyst | |
| Ethan Kim | Engineer | |
| Zoe Rossi | Recruiter |
import { XSelection } from '@xngui/cdk/selection';
const selection = new XSelection({
multiple: true,
compareWith: (a, b) => a.id === b.id,
});
selection.toggle(person);
selection.size(); // → 0
Events
Interact with the preview — events will appear here.