CLI previewInstall commands shown on this site are not released yet.

DocsComponentsNavigation

Kbd

React example follows below.
ts
import { Kbd } from "@grassroot/ui-react";
<Kbd>⌘K</Kbd>
<span className="inline-flex gap-1">
<Kbd>⇧</Kbd>
<Kbd>⌘</Kbd>
<Kbd>P</Kbd>
</span>
ts
<script setup lang="ts">
import { Kbd } from "@grassroot/ui-vue";
</script>
<template>
<Kbd>⌘K</Kbd>
<Kbd>⇧</Kbd>
<Kbd>⌘</Kbd>
<Kbd>P</Kbd>
</template>
ts
import { Component } from "@angular/core";
import { GrassrootKbd } from "@grassroot/ui-angular";
@Component({
selector: "app-example",
standalone: true,
imports: [GrassrootKbd],
template: `
<grassroot-kbd>⌘K</grassroot-kbd>
<grassroot-kbd>⇧</grassroot-kbd>
<grassroot-kbd>⌘</grassroot-kbd>
<grassroot-kbd>P</grassroot-kbd>
`,
})
export class ExampleComponent {
}
ts
<script lang="ts">
import { Kbd } from "@grassroot/ui-svelte";
</script>
<Kbd>⌘K</Kbd>
<Kbd>⇧</Kbd>
<Kbd>⌘</Kbd>
<Kbd>P</Kbd>
ts
import { Kbd } from "@grassroot/ui-solid";
export function Example() {
return (
<>
<Kbd>⌘K</Kbd>
<Kbd>⇧</Kbd>
<Kbd>⌘</Kbd>
<Kbd>P</Kbd>
</>
);
}

Installation

bash
pnpm dlx grassroot add ui/kbd
bash
npx grassroot@latest add ui/kbd
bash
yarn dlx grassroot add ui/kbd
bash
bunx grassroot add ui/kbd

API Reference

This entry takes no props of its own.