Mirrored bank header in Arabic
A sticky header that mirrors cleanly, carries an audience switch and a slash key assistant, and goes transparent over a dark hero.
Scroll inside the frame to see the bar over a page. Links in the preview stay on the block.
Open on its ownThe prompt
One prompt, written to stand on its own: goal, structure, type, colour, spacing, behaviour and the words in square brackets to replace. Paste it into any tool that writes HTML. The Code tab has this block as one file.
685 words
# Mirrored bank header in Arabic One navigation component, not a whole page: build it to drop into a page that already exists. Works in Claude, v0, Lovable, Bolt, Cursor or any tool that writes HTML. ## Goal A sticky top bar for a money app with two audiences, personal and business, that works on white and transparent over a dark hero. ## Structure 1. sticky header bar, one row 2. brand link: wordmark, square dot 3. audience nav: two links, current marked 4. menu button: word plus two bar icon 5. assistant button: mark, label, slash key kbd 6. language link at the far end ## Type Onest 400 to 700 and IBM Plex Sans Arabic 400 to 700, both Google Fonts. Wordmark 700 26px/1, tracking -.045em, dot 7px square. Audience links 15px/1.2 at 72 percent opacity. Menu button 15px, icon 14px by 8px of two 1.5px bars. Assistant 15px, kbd 500 12px/1. Language link 15px. Body 17px/1.5. ## Colour Light: ground #FFFFFF, ink #0B0C0F, muted #5F646D, hairline #E5E7EB, surface #F3F4F6, accent #2B3FF0 with #FFFFFF. Business theme, same markup: #000000, #F5F5F4, #24262B, #121316, accent #6574FF. Over a photograph the bar is transparent with #FFFFFF text. AA: ink and muted on ground, white on accent. ## Spacing and lines Bar 76px, 60px under 760px; side padding clamp(16px, 4vw, 56px); gap 6px; brand 22px clear; max width 1280px. Current audience link in a 999px pill, 8px by 14px. Assistant at the far end: padding 8px 10px 8px 14px, radius 999px, kbd 3px by 6px. Language link a 40px circle. ## Behaviour A class set past 30px of scroll makes the bar solid and fades in a 1px bottom hairline, 350ms. The menu button flips aria-expanded; its bars rotate into a cross, 300ms cubic-bezier(.2,.7,.1,1). Escape closes the panel and refocuses the button, an outside click closes it, arrows walk its items, forward and back mirrored. Slash opens the assistant unless a field has focus. One script: scroll class, toggle, slash key. ## Responsive Under 760px the bar is 60px, the audience nav and the language link are hidden, the menu word swaps to the shorter one, and the assistant becomes a 40px pill with no kbd. Between 761 and 1000px the assistant label goes. ## Accessibility Banner role. Audience nav labelled, current link aria-current. Menu button: aria-expanded, aria-controls on the panel. Assistant: aria-haspopup="dialog", aria-keyshortcuts="/". Kbd and mark aria-hidden. Focus ring 2px accent, offset 3px. Controls 40px tall. ## Built values (from code.html) - Fonts: IBM Plex Sans Arabic 400, 500, 600, 700 (Google Fonts); Onest 400 to 700 (Google Fonts). - Colour variables: --bg #fff, --ink #111, --muted #6b6b6b, --line #e4e4e4, --surface #f6f6f6, --accent #2b3ff0, --accent-ink #fff, --panel #F3F4F6, --pos #1F7A4D. - Font variables: --font-d system-ui, sans-serif; --font-u system-ui, sans-serif; --font-n ui-monospace, monospace. - Size variables: --r 14px, --bar-h 72px, --gutter clamp(16px, 4vw, 56px), --max 1320px. - Media queries: max-width 760px, min-width 761px, max-width 1000px, prefers-reduced-motion. - No media files. - Script: none, CSS only. ## Script Lay the block out right to left: dir="rtl" on the root element, mirrored padding, mirrored icons that point somewhere, mirrored order in every row. Numbers and Latin words keep reading left to right inside the line. ## Content to replace - [Wordmark]: the product name, one word - [Audience links]: two words, who each is for - [Menu labels]: one word wide, one narrow - [Assistant label]: one word, with the slash hint - [Language link]: the other language's two letter code ## Rules Plain, specific copy that reads as a live product; never the word sample. No shadows, glow, glass, blur, gradient text, emoji or italics. Motion moves transform and opacity, with colour, border, height and stroke transitions on state changes, and holds its end state under prefers-reduced-motion. Text passes WCAG AA. ## Output Return the block in one piece: the markup, one style block with the web fonts imported on its first line, and a small script only if the behaviour needs one. No page wrapper, no framework, no build step. Prefix every class with `blk-` and put the colours and sizes in CSS variables at the top.
More like this
Navigation
Same page




