Icons & Icon Collections
Zonvoir Table supports icons using string-based icon identifiers.
Instead of importing icons into your PHP table classes, pass the icon name as a string and let the frontend adapter render it.
Using an icon
Section titled “Using an icon”Pass an icon identifier wherever an icon option is supported.
->icon('heroicons:user')For example:
TableEmptyState::make( title: 'No users found', icon: 'heroicons:users',);Icon format
Section titled “Icon format”Icons use the following format:
collection:iconFor example:
heroicons:userheroicons:usersheroicons:pluslucide:userlucide:userslucide:searchThe part before : identifies the icon collection, while the part after : identifies the icon.
heroicons:users │ │ │ └── icon │ └── collectionEmpty state icons
Section titled “Empty state icons”Add an icon to an empty state:
use Zonvoir\ZonvoirTable\TableEmptyState;
public function emptyState(): TableEmptyState{ return TableEmptyState::make( title: 'No employees found', message: 'Create your first employee to get started.', icon: 'heroicons:users', );}Action icons
Section titled “Action icons”Actions can also display icons:
Action::make('Add employee') ->icon('heroicons:plus') ->url( (new Url())->route('employees.create') );Another action could use a different icon collection:
Action::make('Edit') ->icon('lucide:pencil');Mixing icon collections
Section titled “Mixing icon collections”You are not limited to a single icon collection.
Different supported collections can be used throughout the same application:
TableEmptyState::make( icon: 'heroicons:users',);Action::make('Edit') ->icon('lucide:pencil');Action::make('Delete') ->icon('lucide:trash-2');The frontend adapter resolves the icon identifier and renders the appropriate icon.
Where icons can be used
Section titled “Where icons can be used”Icon identifiers can be passed anywhere Zonvoir Table exposes an icon option.
For example:
->icon('heroicons:users')The same string-based format is used consistently across the package, so you don’t need to import frontend icon components into your PHP table definitions.
Related guides
Section titled “Related guides”- Row Actions — Using action icons and tooltips.
- Bulk Actions — Icons for bulk toolbar operations.
- Empty States — Configuring empty state illustration icons.
- Typed Columns — Adding icons to column actions and headers.