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/kbdbash
npx grassroot@latest add ui/kbdbash
yarn dlx grassroot add ui/kbdbash
bunx grassroot add ui/kbdAPI Reference
This entry takes no props of its own.