Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Situation Tabs Operating Principles Block for Vue

An operating-principles section for an accounting-automation company: line tabs by situation, and under them the open situation's three rules as hairline rows, each with the question we ask.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

An operating-principles section for Vue with Ark UI. A compact header sits over a band of line tabs ruled from rail to rail, one tab per situation: when we disagree, when we are late, when we are wrong, when a customer is upset. Under the band, the open situation's three rules are hairline rows: the rule at the start, and at the end a sentence on what it means and the question we ask to keep to it. Every panel is sized by an unseen copy of the others, so changing situation never moves the page; the block ends on its last row. It's built from Guides and Tabs, with CSS transitions for the entrance and your theme's tokens for every colour. For a handbook, a careers page or an about page that says how a team behaves when it is tested, not what it values. The company and its rules are invented for the example.

FAQ

How do I add a situation or a rule?

Edit SITUATIONS at the top of the file: each situation has an id, a tab label and a list of rules, and each rule a title, a detail and the question we ask. A new situation becomes a new tab with no other change. Keep the rule counts alike so the rows read as a set, though the block keeps the tallest panel's height whatever you do.

Why doesn't the page move when I change tab?

The panels differ in height, and a tab that swaps them would pull everything below it up and down. So an unseen, inert copy of every situation's rules sits in the same grid cell as the open panel, and the cell keeps the tallest. The copies are hidden from assistive technology and from Tab.

How do the tabs work with a keyboard?

The arrow keys move along the tabs, Home and End jump to the first and last, and Tab moves on into the open panel, which has a visible focus ring. Each rule is a term and its descriptions in one definition list, so a screen reader hears the rule, then what it means, then the question.

How does it fit on a phone?

The tabs scroll sideways inside their band, with the selected one underlined, and each row stacks: the rule, then its sentence, then the question. Nothing else scrolls sideways at 320 pixels.

Why are the questions quoted and in italics?

Each one is a question to say out loud in the moment, so it's set apart from the explanation, with its lead-in "We ask" in regular weight. Quote marks are plain characters in the text, so they follow the language you translate the copy into.

What moves, and what happens with reduced motion?

The header and the tab band fade up once when the page loads, and the underline slides to the chosen tab. With reduced motion the entrance is off and the underline jumps.