Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Notice

A notice within the page: what the person needs to know now, with the status told by color, icon and word.

On this page

Playground

Reminder saved

The first one goes out tomorrow at 9.

Status
Close
Background
HTML
<div class="feitio-notice"><svg class="feitio-icon" aria-hidden="true"><use href="/feitio/icons/sprite.svg#feitio-info"></use></svg><strong>Reminder saved</strong><p>The first one goes out tomorrow at 9.</p></div>

When to use

When not to use

Examples

New Feitio version

The docs gained the form guides.

Schedule created

The first notice goes out tomorrow at 9.

Backup late

It runs again today at 3.

Could not save

The connection dropped. What you wrote is still here; try again.

The four

All with the line around them, in the status color; information uses the soft line, with no status color. None is orange.

Show code
HTML
<div class="feitio-notice" data-status="ok" role="status">
  <svg class="feitio-icon" aria-hidden="true">…</svg>
  <strong>Agendamento criado</strong>
  <p>O primeiro aviso sai amanhã às 9h.</p>
</div>

Close and time

New Feitio version

The docs gained the form guides.

With close

The X in the corner: the notice stays until the person closes it. Without the X, it stays until the screen changes.

Show code
HTML
<div class="feitio-notice">
  …
  <span class="tools">
    <button type="button" class="close" aria-label="Fechar o aviso">…</button>
  </span>
</div>
Schedule created

The first one goes out tomorrow at 9.

With time

With data-timeout, the notice goes away on its own, and the thread around the X comes undone as time passes. Hover over it: the time stops.

Show code
HTML
<div class="feitio-notice" data-status="ok" role="status" data-timeout="8000">
  …
  <span class="tools">
    <button type="button" class="close" aria-label="Fechar o aviso">
      <svg class="ring" viewBox="0 0 24 24" aria-hidden="true"><path pathLength="100" d="…"/></svg>…
    </button>
  </span>
</div>
<script>feitioNotice.show(aviso) // depois da ação</script>

Anatomy

Reminder saved

The first one goes out tomorrow at 9.

  1. Status icon.
  2. Title: what happened, short.
  3. Close, optional. With time, the thread around the X comes undone until the notice goes away.
  4. Text, optional: what to do or what comes next.
  5. Box: the background and line in the status color.

Do and don’t

Do

Change approved

The button’s own word, in two words.

Don’t

Success!

Your request was processed successfully.

"Success" does not say what worked, and the text repeats the title.

Writing

Where it goes

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-notice"requiredThe notice box.
data-statusnone, "ok", "warn", "error"Information (no attribute), success, warning or error.
role"status", "alert"When it appears after an action.
class="tools" + class="close"optionalThe close button, top right.
data-timeoutmillisecondsGoes away after this time; only with success and information. Carries the thread around the X.
feitioNotice.show(el)JSShows the notice after an action: it lands as paper, or only restarts the time if already on screen.
Top