code
Inline code, or a block with an optional copy button.
Example
Edit config/admin-ui.php
to continue.
php artisan admin-ui:install --brand=7c3aed
Laravel
<x-admin::stack gap="2">
<p>Edit <x-admin::code>config/admin-ui.php</x-admin::code> to continue.</p>
<x-admin::code block copy>php artisan admin-ui:install --brand=7c3aed</x-admin::code>
</x-admin::stack>Props
| Prop | Required | Default | Options |
|---|---|---|---|
block | false | ||
copy | false |
Other attributes, such as wire:model or data-*, pass through to the element.
Other stacks
React and Vue: import { Code } from "@admiral/ui-kit/react" (or /vue). See the React and Vue guide.
HTML, for any stack
<div class="adm-stack" style="gap:var(--ad-space-2)"><p>Edit <code class="adm-code">config/admin-ui.php</code>
to continue.</p>
<div class="adm-code-block">
<pre tabindex="0"><code>php artisan admin-ui:install --brand=7c3aed</code></pre>
<button type="button" class="adm-btn adm-btn--secondary adm-btn--square adm-btn--xs adm-code-block__copy" data-adm-copy="php artisan admin-ui:install --brand=7c3aed" aria-label="Copy code"><svg class="adm-icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="12" height="12" rx="2"/><path d="M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1"/></svg></button>
</div></div>