# Divider with label

A rule with a word set into it. The same engraved groove as the separator runs out to both sides of a printed word, broken where the word sits: “or” between two ways in, a date between two days of messages, the name of the section below. The word is real text in reading order; only the two grooves are drawn.

Kit part · Free · https://tactileui.dev/parts/divider-label

- Element: `<div class="tui-divider">`
- Needs: `kit.css` only, no script ([how to install the kit](https://tactileui.dev/docs/installation#the-kit))
- Categories: Cards & panels, Sign in & sign up
- Finishes: Aluminium, Graphite, Oak, Walnut, Porcelain, Black, Daylight, Night, Paper, Phosphor, E-paper, AMOLED
- Volumes: Tactile, Quiet

## Variants

### Centred · or

```html
<div style="width:min(100%,360px)"><div class="tui-divider">or</div></div>
```

### At the start · --start

```html
<div style="width:min(100%,360px)"><div class="tui-divider tui-divider--start">Billing</div></div>
```

### At the end · --end

```html
<div style="width:min(100%,360px)"><div class="tui-divider tui-divider--end">Continued</div></div>
```

### A date as written · --plain

```html
<div style="width:min(100%,360px)"><div class="tui-divider tui-divider--plain"><time datetime="2026-10-05">Monday 5 October</time></div></div>
```

### A heading

```html
<div style="width:min(100%,360px)"><h3 class="tui-divider tui-divider--start">Billing</h3></div>
```

### Upright · --vertical

```html
<div style="display:flex;gap:16px;height:150px;align-items:stretch"><span style="align-self:center">Sign in</span><div class="tui-divider tui-divider--vertical">or</div><span style="align-self:center">Sign up</span></div>
```

### A long word wraps

```html
<div style="width:min(100%,240px)"><div class="tui-divider">Unreleased changes still waiting for a second pair of eyes</div></div>
```

## Every state

- Centred
- At the start
- At the end
- Plain

Hover, pressed and focus are forced with `.is-hover`, `.is-down` and `.is-focus`; checked and disabled are real.

## API

| Name | Kind | Values | What it does |
| - | - | - | - |
| div.tui-divider | element | text or span | The rule and its word: a flex row with a groove either side. Use a heading element where the word names a section. |
| .tui-divider__text | class | optional | The word, when it needs an element of its own. It wraps and never pushes the rules off the plate. |
| --start · --end | modifier | tui-divider--start, --end | The word at one end, with the rule running on from the other side only. |
| --plain | modifier | tui-divider--plain | The word as it is written, not printed as a legend: for a date or a name that must keep its capitals. |
| --vertical | modifier | tui-divider--vertical | Between two columns, with the word set upright between two upright rules. |

## Markup

```html
<!-- Between two alternatives -->
<div class="tui-divider">or</div>

<!-- A day, with the rule running on from it -->
<div class="tui-divider tui-divider--start"><time datetime="2026-10-05">Monday 5 October</time></div>

<!-- A section's name: use a heading, so it is one -->
<h3 class="tui-divider tui-divider--start">Billing</h3>
```

The demo on the page:

```html
<div class="tui-panel" style="width:min(100%,460px);display:grid;gap:16px;text-align:left"><div class="tui-panel__head" style="margin-bottom:0"><span class="tui-label">Sign in · Northwind</span></div><div style="display:grid;gap:0">
  <button class="tui-key tui-key--primary" type="button" style="width:100%">Continue with a passkey</button>
  <div class="tui-divider">or</div>
  <div class="tui-field"><label class="tui-label" for="dl-email">Email</label><input class="tui-input" id="dl-email" type="email" placeholder="you@harlowfinch.example"></div>
  <button class="tui-key" type="button" style="width:100%;margin-top:12px">Email me a link</button>
</div>
<div style="display:grid;gap:0">
  <div class="tui-divider tui-divider--start tui-divider--plain"><time datetime="2026-10-05">Monday 5 October</time></div>
  <div style="display:flex;justify-content:space-between;gap:12px"><span>Dana Whitlock</span><span class="tui-muted">Re: site visit</span></div>
  <div class="tui-divider tui-divider--start tui-divider--plain"><time datetime="2026-10-02">Friday 2 October</time></div>
  <div style="display:flex;justify-content:space-between;gap:12px"><span>Rhys Okafor</span><span class="tui-muted">Drawings, revision B</span></div>
</div></div>
```

## Usage notes

The sign-in panel offers two ways in, with “or” between them. The inbox below it runs from today back, each day under a rule that names it at its start. Narrow the window and the word wraps instead of pushing the rule off the plate.

## Accessibility

- The word is ordinary text in reading order, so a screen reader says “or” between the two choices and “Monday 5 October” before that day’s messages; the two grooves are drawn and say nothing.
- It has no role of its own on purpose: a separator’s children are not read, which would hide the word. Where the rule names a section, make it a heading, and where it dates something, put a `<time>` inside.
- The word is printed in the secondary ink (6:1 on the plate); the grooves are decoration, so their softness is no loss.
- It takes no focus and nothing moves. A word that is too long for the row wraps, so there is no sideways scroll at 390px.

## How it’s built

A flex row whose two pseudo-elements are the separator’s groove, each taking the space the word leaves. The word is set in the kit’s printed legend, or in plain type with --plain. Upright, the row becomes a column and the grooves turn to the upright cut with its lit wall on the right.

## Rules

Put one word into a rule: “or” between two choices, a date between two days, or a section name above what follows.

The full rules are in `divider-label.rules.md` in the brain, which ships with the Kit.

## Related parts

- [Separator](https://tactileui.dev/parts/separator): An engraved rule: a fine groove cut into the plate, a hairline with a catch of light on its lower wall, or on its right wall when it stands upright. It divides without shouting, with no colour, no weight and nothing to read. Quiet keeps only the hairline. A real hr is a separator to a screen reader; one that only spaces things out says nothing.
- [Panel](https://tactileui.dev/parts/panel): A face plate that groups what belongs together: a head, a rule, then the parts. Screws only on device-like panels.
- [Field](https://tactileui.dev/parts/field): Text entry in a recess, the label printed above it, and a hint that says how to fix an error.
