Appearance
Function: iconBox()
ts
function iconBox(props: UiIconBoxProps): Element;Defined in: src/UI/blocks/iconBox.tsx:52
Icon box component for displaying icons within a colored container box.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | UiIconBoxProps | Configuration object |
Returns
Element
Examples
Basic usage with static values
iconBox({
icon: 'user',
size: 32,
boxColor: '#e3f2fd',
iconColor: '#1976d2'
});Usage with dynamic values from params with data and value
iconBox({
icon: ({data}) => data.user.isOnline ? 'user-check' : 'user-x',
size: 40,
boxColor: ({data}) => data.user.isOnline ? '#e8f5e8' : '#ffeaea',
iconColor: ({data}) => data.user.isOnline ? '#4caf50' : '#f44336'
});Usage with large size and margins
iconBox({
icon: 'settings',
size: 48,
boxColor: '#f5f5f5',
margin: [16, 8],
className: 'custom-icon-box'
});