WlToolbar

One keyboard stop for a labelled group of related actions.
Components / Navigation v1.0.0-rc.1

Placement

Formatting applies to this text.

Arrows follow orientation; Home and End focus the first and last enabled actions. Text editing keys remain with inputs.

Full example
<script setup lang="ts">
import { WlButton, WlToolbar } from "legato-ui";
import { ref } from "vue";
const bold = ref(false);
const italic = ref(false);
</script>

<template>
  <div class="wl-stack" data-space="md" data-review-example="WlToolbar">
    <WlToolbar  aria-label="Text formatting">
      <WlButton size="sm" :aria-pressed="bold" @click="bold = !bold">{{ "Bold" }}</WlButton>
      <WlButton size="sm" disabled>{{ "Underline (unavailable)" }}</WlButton>
      <WlButton
        size="sm"
        :aria-pressed="italic"
        @click="italic = !italic"
      >{{ "Italic" }}</WlButton>
    </WlToolbar>
    <p :style="{ fontWeight: bold ? 'bold' : 'normal', fontStyle: italic ? 'italic' : 'normal' }">
      {{ "Formatting applies to this text." }}
    </p>
    <WlButton size="sm" @click="bold = false; italic = false">{{ "Restore example" }}</WlButton>
    <p class="wl-text-small">{{ "Arrows follow orientation; Home and End focus the first and last enabled actions. Text editing keys remain with inputs." }}</p>
  </div>
</template>

Related formatting actions

One keyboard stop for a labelled group of related actions.

Formatting applies to this text.

Arrows follow orientation; Home and End focus the first and last enabled actions. Text editing keys remain with inputs.

Full example
<script setup lang="ts">
import { WlButton, WlToolbar } from "legato-ui";
import { ref } from "vue";
const bold = ref(false);
const italic = ref(false);
</script>

<template>
  <div class="wl-stack" data-space="md" data-review-example="WlToolbar">
    <WlToolbar  aria-label="Text formatting">
      <WlButton size="sm" :aria-pressed="bold" @click="bold = !bold">{{ "Bold" }}</WlButton>
      <WlButton size="sm" disabled>{{ "Underline (unavailable)" }}</WlButton>
      <WlButton
        size="sm"
        :aria-pressed="italic"
        @click="italic = !italic"
      >{{ "Italic" }}</WlButton>
    </WlToolbar>
    <p :style="{ fontWeight: bold ? 'bold' : 'normal', fontStyle: italic ? 'italic' : 'normal' }">
      {{ "Formatting applies to this text." }}
    </p>
    <WlButton size="sm" @click="bold = false; italic = false">{{ "Restore example" }}</WlButton>
    <p class="wl-text-small">{{ "Arrows follow orientation; Home and End focus the first and last enabled actions. Text editing keys remain with inputs." }}</p>
  </div>
</template>