ComponentsComplex
Sort UI
Configure sorting with dropdowns or button toggles
The Sort UI component exposes single or multi-field sorting controls.
JSON Configuration
{
type: 'sort-ui',
variant: 'dropdown',
multiple: true,
fields: [
{ field: 'name', label: 'Name' },
{ field: 'created_at', label: 'Created At' }
],
sort: [{ field: 'name', direction: 'asc' }]
}Basic Usage
Sort UI
Multi-field sorting with a dropdown builder.
{
"type": "sort-ui",
"variant": "dropdown",
"multiple": true,
"fields": [
{
"field": "name",
"label": "Name"
},
{
"field": "created_at",
"label": "Created At"
},
{
"field": "status",
"label": "Status"
}
],
"sort": [
{
"field": "name",
"direction": "asc"
}
]
}Schema
interface SortUISchema {
type: 'sort-ui';
fields: Array<{
field: string;
label?: string;
}>;
sort?: Array<{
field: string;
direction: 'asc' | 'desc';
}>;
onChange?: string;
multiple?: boolean;
variant?: 'dropdown' | 'buttons';
}