Skip to content
Brok UI

Loading…

No results

Token

Open source

tokenui.dev-inspired design-token documentation chips — a base name → value token with click-to-copy, plus typed variants for colour, typography, dimension, motion and scalar tokens.

Version
v1.1.1
Stability
stable
License
MIT
Related
Token
Color Token
Typography Token
Font Family Token
Font Weight Token
Spacing Token
Radius Token
Elevation Token
Duration Token
Number Token
11 of 11

Order Token — Documents a single z-index / stacking-order design token — a stacked-layers glyph plus the token name, with the integer value revealed in a tooltip on hover and click-to-copy.

Preview

z-dropdown 1000 z-overlay 1200 z-modal 1300 z-toast 1500 z-tooltip 1600
Side
previews.components.order-token.default.blade.php Blade
<div class="flex flex-wrap items-center gap-3">
    <x-ui.order-token name="z-dropdown" value="1000" />
    <x-ui.order-token name="z-overlay" value="1200" />
    <x-ui.order-token name="z-modal" value="1300" />
    <x-ui.order-token name="z-toast" value="1500" />
    <x-ui.order-token name="z-tooltip" value="1600" />
</div>
Top Current
Right Current
Bottom Current
Left Current

Installation

terminal
php artisan ui:add order-token

Registry contract

php artisan ui:add order-token writes only the files below. The CLI validates each file hash before writing and asks before it replaces a local change, unless you pass --force.

  • blade resources/views/components/ui/order-token.blade.php
Registry dependencies
token
Packages
composer: jml/brok:^0.2

Use with AI

A brief for your coding agent: install command, usage, props, guidance and the rules. Copy it, or open a prompt about this component in an assistant.

order-token.md
# Brok UI: Order Token (`order-token`)

Documents a single z-index / stacking-order design token — a stacked-layers glyph plus the token name, with the integer value revealed in a tooltip on hover and click-to-copy.

Brok UI is a Laravel Blade component registry. Installed components are plain Blade files the app owns.

## Install

```bash
php artisan ui:add order-token
```

## Usage

```blade
<div class="flex flex-wrap items-center gap-3">
    <x-ui.order-token name="z-dropdown" value="1000" />
    <x-ui.order-token name="z-overlay" value="1200" />
    <x-ui.order-token name="z-modal" value="1300" />
    <x-ui.order-token name="z-toast" value="1500" />
    <x-ui.order-token name="z-tooltip" value="1600" />
</div>
```

## Props

- `name` (string, default ``) — Token name shown as the chip label and tooltip trigger.
- `value` (string, default ``) — Token integer stacking-order value, shown in the tooltip and copied to the clipboard.
- `copyable` (bool, default `true`) — Shows the copy button when true.
- `side` (string, default `top`) — Tooltip placement side.

## Use when

- Use to document, inspect, and apply design-system decisions consistently across teams and AI tooling.
- Documenting a z-index / stacking-order token so it reads clearly alongside the layer it controls.
- Listing an app's stacking scale in a style guide.

## Avoid when

- Do not present token-level controls to end users who only need product functionality.
- Documenting a non-order numeric token, such as an opacity or scale factor; use number-token instead.

## Anti-patterns

- Exposing implementation tokens as product settings

## Rules

- Use the `<brok:order-token>` tag (or `<x-ui.order-token>`) in Blade; do not rewrite the component.
- Prefer the documented props and variants over utility-class overrides; when a utility must win, use the `!` important modifier.
- Use semantic design tokens (`bg-primary`, `text-muted-foreground`), never raw colour utilities.
- Keep the `data-slot` attributes; they are the styling and test hooks.

## Links

- Docs: https://brokui.dev/docs/components/order-token
- Registry JSON (files, props, contract): https://brokui.dev/r/open/order-token.json

Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.

API

manifest knowledge + registry-derived coverage

Props

Props accepted by this component: name, type, default value and description.
Prop Type Default Description
name string Token name shown as the chip label and tooltip trigger.
value string Token integer stacking-order value, shown in the tooltip and copied to the clipboard.
copyable bool true Shows the copy button when true.
side string top Tooltip placement side.

Slots

  • default — Extra content appended inside the chip.

Data slots

Stable hooks for CSS overrides and browser tests.

order-token

Behavior

  • Composes the base token chip and supplies a stacked-layers glyph as the indicator; the integer value itself is only shown in the tooltip and copy.
  • Declares registry capability flags: a11y, responsive, rtl, darkMode, localized.

Guidance

Design-token documentation

Inspect and govern design-system decisions.

Use when

  • Use to document, inspect, and apply design-system decisions consistently across teams and AI tooling.
  • Documenting a z-index / stacking-order token so it reads clearly alongside the layer it controls.
  • Listing an app's stacking scale in a style guide.

Avoid when

  • Do not present token-level controls to end users who only need product functionality.
  • Documenting a non-order numeric token, such as an opacity or scale factor; use number-token instead.

Use instead

  • Product-level controls for end users

Anti-patterns

  • Exposing implementation tokens as product settings
Anatomy
root
Theming hooks
order-token

Accessibility

WCAG 2.2 AA Keyboard focus-visible RTL-ready Localized labels Dark mode
Keyboard
No component-owned keyboard interaction; native element behavior applies.
Focus
none
  • The glyph is decorative and aria-hidden; the token name and tooltip carry the actual integer value.
  • Semantic HTML and a stable data-slot attribute for styling and scripting hooks.
  • Focus-visible rings use the ring token, so keyboard focus is always visible.
  • Disabled and invalid states are conveyed to assistive tech, not by color alone.
  • Targets WCAG 2.2 AA; verify contrast in light, dark, admin and customer surfaces in the preview.
  • Labels go through __() and layout uses logical properties (ms-*, text-start), so it mirrors under dir="rtl" — flip the preview to RTL to confirm.
  • Dark mode uses the same semantic tokens under the dark class; high contrast follows forced-color system tokens.

Livewire

Safe

Livewire can update this component through forwarded wire:* attributes.

Source

The exact, editable file ui:add writes into your app. Previews render this same code; there are no preview-only components.

resources/views/components/ui/order-token.blade.php Blade
@props([
    'name' => '',
    'value' => '',
    'copyable' => true,
    'side' => 'top',
])

{{--
    Order Token (tokenui.dev-inspired) — documents a single z-index / stacking-order
    design token. A stacked-layers glyph plus the token name; the integer value is
    revealed in a tooltip on hover/focus and copied with one click. Implements a
    `number`-typed stacking order from the W3C Design Tokens spec. Composes the
    base `token` chip and supplies the glyph through its `indicator` slot.
--}}

<x-ui.token
    data-slot="order-token"
    :name="$name"
    :value="$value"
    :copyable="$copyable"
    :side="$side"
    {{ $attributes }}
>
    <x-slot:indicator>
        <svg xmlns="http://www.w3.org/2000/svg" class="size-4 text-muted-foreground" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 12.18-9.17 4.16a2 2 0 0 1-1.66 0L2 12.18"/><path d="m22 17.18-9.17 4.16a2 2 0 0 1-1.66 0L2 17.18"/></svg>
    </x-slot:indicator>
</x-ui.token>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.1.1
Status
Stable
License
open
Accessibility reviewed
No review date recorded
Last breaking change
No date recorded
Deprecation
Not deprecated
Contract
v6
Foundation
≥ 1.0.0