Aug 7, 2024

You can use the Commands component imported from $lib/components. Pass it an array of objects containing each a name key representing for exemple a package manager and a command key representing the associated command.

Demo

Loading...

SyncKey

You can use the syncKey property to sync multiple Commands components selected elements. For exemple :

<Commands {commands} syncKey="test" />
<Commands {commands} syncKey="test" />

Gives the following result :

Definition

Commands

The commands component.

commands
array
Required
The name of the component.
commands.name
string
Required
The name of the file or directory.
commands.command
string
Required
The actual command displayed.
syncKey
string
A key used to identify and sync multiple components selected item.
Last updated : Aug 7, 2024