aboutsummaryrefslogtreecommitdiff
path: root/htmx/static/pico-1.5.11/docs/src/buttons.html
blob: 7b37c18223633d36fe917e5eb1907ee97bf799f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!doctype html>
<html lang="en">
  <head>
    ${require('./_head.html') 
      title=`Buttons`
      description=`The essential button in pure HTML, without .classes for the default style.`
      canonical=`buttons.html`
    }
  </head>

  <body>
    ${require('./_nav.html')}
    
    <main class="container" id="docs">
      ${require('./_sidebar.html') active=`buttons-link`}
      
      <div role="document">
        <section id="buttons">
          <hgroup>
            <h1>Buttons</h1>
            <h2>The essential button in pure HTML, without <code>.classes</code> for the default style.</h2>
          </hgroup>
          <article aria-label="Button example">
            <button aria-label="Button">Button</button>
            <input type="submit">
            <footer class="code">

<pre><code>&lt;<b>button</b>&gt;Button&lt;/<b>button</b>&gt;
&lt;<b>input</b> <i>type</i>=<u>"submit"</u>&gt;</code></pre>

            </footer>
          </article>
          <p>Buttons are <code><i>width</i>: <u>100%</u>;</code> by default. Use <code><i>role</i>=<u>"button"</code> on an inline element if you need an inline button.</p>
          <article aria-label="Inline buttons examples">
            <a href="#" onclick="event.preventDefault()" role="button">Link</a>
            <a href="#" onclick="event.preventDefault()" role="button">Link</a>
            <footer class="code">

<pre><code>&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u>&gt;Link&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u>&gt;Link&lt;/<b>a</b>&gt;</code></pre>

            </footer>
          </article>
          <p>Buttons come with <code>.secondary</code> and <code>.contrast</code> styles.</p>
          <p>ℹ️&nbsp;These classes are not available in the <a href="classless.html">class-less version</a>.</p>
          <article aria-label="Buttons styles examples">
            <a href="#" onclick="event.preventDefault()" role="button" class="secondary">Secondary</a>
            <a href="#" onclick="event.preventDefault()" role="button" class="contrast">Contrast</a>
            <footer class="code">

<pre><code>&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u> <i>class</i>=<u>"secondary"</u>&gt;Secondary&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u> <i>class</i>=<u>"contrast"</u>&gt;Contrast&lt;/<b>a</b>&gt;</code></pre>

            </footer>
          </article>
          <p>And a classic <code>.outline</code> variant.</p>
          <article aria-label="Outline style examples">
            <a href="#" onclick="event.preventDefault()" role="button" class="outline">Primary</a>
            <a href="#" onclick="event.preventDefault()" role="button" class="secondary outline">Secondary</a>
            <a href="#" onclick="event.preventDefault()" role="button" class="contrast outline">Contrast</a>
            <footer class="code">

<pre><code>&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u> <i>class</i>=<u>"outline"</u>&gt;Primary&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u> <i>class</i>=<u>"secondary outline"</u>&gt;Secondary&lt;/<b>a</b>&gt;
&lt;<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u> <i>class</i>=<u>"contrast outline"</u>&gt;Contrast&lt;/<b>a</b>&gt;</code></pre>

            </footer>
          </article>
        </section>

        ${require('./_footer.html')}
        
      </div>
    </main>
    <script src="js/commons.min.js"></script>
  </body>
</html>