Module Solidtype_heroui.Kbd

HeroUI's Kbd: a <kbd>, with HeroUI's classes from Styles.Kbd, that shows a key or a combination of keys, each modifier by its symbol and the rest by its text.

  <Kbd>
    <Kbd.Abbr key_value=`command />
    <Kbd.Content>"K"</Kbd.Content>
  </Kbd>

Kbd's variants are a keyboard's, not a component's behaviour, so no Kobalte component underlies it. A part's classes are the same in any key, so a part needs no Kbd around it.

type key = [
  1. | `command
  2. | `shift
  3. | `ctrl
  4. | `option
  5. | `enter
  6. | `delete
  7. | `escape
  8. | `tab
  9. | `capslock
  10. | `up
  11. | `right
  12. | `down
  13. | `left
  14. | `pageup
  15. | `pagedown
  16. | `home
  17. | `end_
  18. | `help
  19. | `space
  20. | `fn
  21. | `win
  22. | `alt
]

A key HeroUI draws by its symbol: `command is ⌘, named "Command".

module Abbr : sig ... end

A key's symbol: an <abbr> titled with the key's name.

module Content : sig ... end

A key's text, a letter or a word: a <span>.

module Props : sig ... end