Custom Components
Thinkrix backend schema can only reference frontend components registered in Trix. To add a real frontend component, edit trix/src, build it, and sync the built assets.
PHP Wrapper For Existing Frontend Component
php
namespace App\Schema\Components;
use Thinkrix\Schema\Components\Component;
class MyWidget extends Component
{
public function __construct()
{
parent::__construct('MyWidget');
}
public static function make(): static
{
return new static();
}
}Frontend Component Flow
- Create the Vue component in
trix/src. - Register it in
trix/src/plugins/json-renderer.ts. - Build Trix.
- Sync the build output to
lartrix-think/resources/admin. - Add a Thinkrix PHP schema wrapper if desired.
Do not edit built files under lartrix-think/resources/admin directly.