Code Entry
Transform your raw code data into beautifully syntax-highlighted presentations that rival the best developer tools. Powered by Phiki's server-side highlighting engine, Code Entry brings TextMate grammar precision and Visual Studio Code themes directly to your Laravel application. Whether you're building a documentation platform, API explorer, or developer dashboard, this component delivers production-ready code display with copy-to-clipboard functionality and 200+ language support.
# Basic syntax highlighting with PHP
The most straightforward implementation using PHP grammar highlighting. Perfect for displaying stored procedures, configuration files, or any PHP code snippets. The component automatically handles proper tokenization and color coding using server-side processing for consistent results.
use Filament\Infolists\Components\CodeEntry;
use Phiki\Grammar\Grammar;
CodeEntry::make('php_code')
->grammar(Grammar::Php)
# Custom themes for visual consistency
Apply 50+ professional themes including popular choices like Dracula, GitHub Dark, and Monokai. Set different themes for light and dark modes to maintain visual consistency across your application's theme switching.
use Filament\Infolists\Components\CodeEntry;
use Phiki\Theme\Theme;
CodeEntry::make('js_example')
->label('JavaScript Example')
->grammar(Grammar::Javascript)
->lightTheme(Theme::GithubDarkDimmed)