001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.html5;
018
019import org.apache.juneau.marshall.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element">&lt;kbd&gt;</a>
023 * element.
024 *
025 * <p>
026 * The kbd element represents user input, typically keyboard input but can also represent other types
027 * of input such as voice commands or menu selections. It is commonly styled with a monospace font
028 * to distinguish it from regular text and often appears in documentation, tutorials, and help pages.
029 *
030 * <h5 class='section'>Examples:</h5>
031 * <p class='bcode w800'>
032 *    <jc>// Simple keyboard shortcut</jc>
033 *    Kbd <jv>simple</jv> = <jsm>kbd</jsm>(<js>"Ctrl+S"</js>);
034 *
035 *    <jc>// Keyboard combination with nested kbd elements</jc>
036 *    P <jv>shortcut</jv> = <jsm>p</jsm>(
037 *       <js>"Press "</js>,
038 *       <jsm>kbd</jsm>(<js>"Ctrl"</js>),
039 *       <js>" + "</js>,
040 *       <jsm>kbd</jsm>(<js>"C"</js>),
041 *       <js>" to copy."</js>
042 *    );
043 *
044 *    <jc>// Menu selection instruction</jc>
045 *    P <jv>menu</jv> = <jsm>p</jsm>(
046 *       <js>"Select "</js>,
047 *       <jsm>kbd</jsm>(<js>"File"</js>),
048 *       <js>" → "</js>,
049 *       <jsm>kbd</jsm>(<js>"Save As..."</js>)
050 *    );
051 *
052 *    <jc>// Command line input</jc>
053 *    P <jv>command</jv> = <jsm>p</jsm>(
054 *       <js>"Type "</js>,
055 *       <jsm>kbd</jsm>(<js>"npm install"</js>),
056 *       <js>" to install dependencies."</js>
057 *    );
058 *
059 *    <jc>// With styling</jc>
060 *    Kbd <jv>styled</jv> = <jsm>kbd</jsm>(<js>"Enter"</js>)
061 *       .class_(<js>"key-highlight"</js>)
062 *       .title(<js>"Press Enter to submit"</js>);
063 *
064 *    <jc>// Multiple key sequence</jc>
065 *    P <jv>sequence</jv> = <jsm>p</jsm>(
066 *       <js>"To exit, press "</js>,
067 *       <jsm>kbd</jsm>(<js>"Esc"</js>),
068 *       <js>" or "</js>,
069 *       <jsm>kbd</jsm>(<js>"Ctrl"</js>),
070 *       <js>" + "</js>,
071 *       <jsm>kbd</jsm>(<js>"Q"</js>)
072 *    );
073 * </p>
074 *
075 * <p>
076 * The following convenience methods are provided for constructing instances of this bean:
077 * <ul class='javatree'>
078 *    <li class='jc'>{@link HtmlBuilder}
079 *    <ul class='javatree'>
080 *       <li class='jm'>{@link HtmlBuilder#kbd() kbd()}
081 *       <li class='jm'>{@link HtmlBuilder#kbd(Object...) kbd(Object...)}
082 *    </ul>
083 * </ul>
084 * </p>
085 *
086 * <h5 class='section'>See Also:</h5><ul>
087 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
088 * </ul>
089 */
090@Marshalled(typeName = "kbd")
091public class Kbd extends HtmlElementMixed<Kbd> {
092
093   /**
094    * Creates an empty {@link Kbd} element.
095    */
096   public Kbd() {}
097
098   /**
099    * Creates a {@link Kbd} element with the specified child nodes.
100    *
101    * @param children The child nodes.
102    */
103   public Kbd(Object...children) {
104      children(children);
105   }
106
107}