Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Example

A component’s live example, with its title, explanation and code, closed until the person asks.

On this page

Playground

Primary

The action the screen exists for.

Show code
HTML
<button class="feitio-button" type="button" data-variant="primary">Save changes</button>
Background
HTML
<div class="feitio-example"><div class="live"><button class="feitio-button" type="button" data-variant="primary">Save changes</button></div><div class="about"><h3 id="pg-ex">Primary</h3><p>The action the screen exists for.</p><details><summary><svg class="feitio-icon" aria-hidden="true"><use href="/feitio/icons/sprite.svg#feitio-chevron-right"></use></svg>Show code</summary><div class="feitio-code" data-lang="html"><div class="bar"><span>HTML</span><button type="button" class="feitio-button copy" data-size="small" data-done-label="Copiado">Copiar</button></div><pre tabindex="0"><code>&lt;button class=&quot;feitio-button&quot; type=&quot;button&quot; data-variant=&quot;primary&quot;&gt;Save changes&lt;/button&gt;</code></pre></div></details></div></div>

When to use

When not to use

Examples

An Example

This very box: the live component on top; below, the title (which goes into the Anchor), the explanation and "Show code".

Show code
HTML
<div class="feitio-example">
  <div class="live">…o componente…</div>
  <div class="about">
    <h3 id="ex-salvar">Principal</h3>
    <p>…</p>
    <details><summary>…Mostrar código</summary><div class="feitio-code">…</div></details>
  </div>
</div>

Rules

Attributes

AttributeValuesWhat for
class="feitio-example"requiredThe example box.
class="live"the top areaThe working component.
class="about"the bottom areaThe title, the explanation and the code.
Top