Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

Code

Escaped inline code.

beta

Try it

tcp deploy --env production
Svelte
<Code value="tcp deploy --env production" />

Examples

Inline

Run tcp deploy --env production to ship the current build.

Inline.svelte
<script lang="ts">
	import Code from '@tcpsystems/ui/foundation/Code';
</script>

<p>Run <Code value="tcp deploy --env production" /> to ship the current build.</p>

In sentence

Set ACUMEN_BASE_URL to https://ai.tcp.systems/v1 before starting the worker.

In sentence.svelte
<script lang="ts">
	import Code from '@tcpsystems/ui/foundation/Code';
</script>

<p>Set <Code value="ACUMEN_BASE_URL" /> to <Code value="https://ai.tcp.systems/v1" /> before starting the worker.</p>

Flags

--dry-run --region eu-central --timeout 30s
Flags.svelte
<script lang="ts">
	import Code from '@tcpsystems/ui/foundation/Code';
	import Cluster from '@tcpsystems/ui/foundation/Cluster';
</script>

<Cluster>
	<Code value="--dry-run" />
	<Code value="--region eu-central" />
	<Code value="--timeout 30s" />
</Cluster>

Paths

Configuration is read from /etc/tcp/studio.toml and then overridden by ~/.config/tcp/config.toml.

Paths.svelte
<script lang="ts">
	import Code from '@tcpsystems/ui/foundation/Code';
</script>

<p>Configuration is read from <Code value="/etc/tcp/studio.toml" /> and then overridden by <Code value="~/.config/tcp/config.toml" />.</p>

API

Import
import Code from '@tcpsystems/ui/foundation/Code';
PropTypeDefault
mode?'inline' | 'block''inline'
value?stringnone
code?string''
html?stringnone
lang?stringnone
title?stringnone
label?stringnone
copyLabel?string'Copy'
copiedLabel?string'Copied'
errorLabel?string'Copy failed. Select and copy the text.'
disabled?booleanfalse
track?stringnone
HookKind
.tcp-codeRoot class
data-copied-labelData attribute
data-copy-jsonData attribute
data-error-labelData attribute
data-tcp-trackData attribute