sticky-and-fixed-elements
Sticky headers, bottom toolbars, floating action buttons and pinned table headers.
Skill by dembrandt
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dembrandt-sticky-and-fixed-elements
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sticky-and-fixed-elements
What's inside
- Skill name
sticky-and-fixed-elements- Description
- Sticky headers, bottom toolbars, floating action buttons and pinned table headers. Use when deciding what stays on screen while the user scrolls.
- License
- MIT
- Metadata
- priority: 6
- Instructions
- 104 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Sticky and Fixed Elements
## position: fixed vs position: sticky
| Property | Behaviour | Use for |
|---|---|---|
| `position: fixed` | Removed from document flow. Always stays at the same viewport position regardless of scroll or parent. | Global navigation header, bottom toolbar, floating action button |
| `position: sticky` | Stays in document flow until it hits its scroll threshold, then locks in place. Returns to flow when parent scrolls past. | Table column headers, section headings in a long list, in-page toolbars within a scroll container |
**Prefer `sticky` over `fixed`** when the element belongs to a specific section or scroll context. Fixed elements sit above everything and affect the entire viewport — use them only for truly global UI.
## Top — Navigation Header
The global navigation header is the most common fixed element. It should:
- Remain visible at all times so the user can always navigate away
- Be as thin as possible to maximise content area — 48–64px is a common range
- Have a background and shadow so content scrolling beneath it does not bleed through
- On scroll, a subtle shadow (`--shadow-sm`) signals that content is behind it
```css
.site-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: var(--header-height);
background: var(--color-surface);
box-shadow: var(--shadow-sm);
z-index: var(--z-header);
}
```
Compensate for the fixed header with matching top padding on the page body:
```css
body { padding-top: var(--header-height); }
```
## Bottom — Toolbar on Mobile
On mobile, the bottom of the screen is the most reachable area with one thumb. A persistent bottom toolbar is the natural home for:
- Primary navigation (bottom tab bar — iOS and Android convention)
- Contextual actions for the current view (edit, share, delete)
- A floating action button (FAB) for the single most important action
Bottom toolbars should:
- Respect the safe area inset on devices with a home indicator: `padding-bottom: env(safe-area-inset-bottom)`
- Be visually separated from content (background fill, top border, or shadow)
- Contain 3–5 items maximum — more than 5 should move to a menu or a different pattern
- Use icons with labels for navigation tabs, or icons alone for contextual toolbars (with tooltips)
On desktop, bottom toolbars are uncommon. Status bars, editor toolbars, and command palettes are the desktop equivalent — these are typically `position: fixed` at the bottom or `position: sticky` within their scroll container.
## Sticky Table Headers
For data tables inside a scroll container, sticky column headers prevent the user from losing track of what each column means.
```css
thead th {
position: sticky;
top: 0;
background: var(--color-surface);
z-index: 1;
}
```
If the table also has a sticky first column (for row identifiers), the top-left cell needs both `top: 0` and `left: 0`, and a higher `z-index` to sit above both the header row and the sticky column.
## Stacking and Z-index
Sticky and fixed elements create stacking context. Define z-index as named tokens, not arbitrary numbers:
```css
--z-base: 0;
--z-dropdown: 100;
--z-sticky: 200;
--z-header: 300;
--z-modal: 400;
--z-toast: 500;
```
Every fixed or sticky element must declare its z-index explicitly using a token. Avoid ad-hoc values like `z-index: 9999` — they signal an unmanaged stacking context and will eventually conflict.
## How Many Fixed Layers Is Too Many
Each fixed layer removes space from the content area and adds visual complexity. A page should rarely need more than:
- 1 fixed header (top)
- 1 fixed toolbar or bottom nav (bottom, mobile)
- 1 floating action button or contextual overlay
A fixed header + fixed bottom toolbar + floating button + sticky sidebar + sticky table header all simultaneously is too many layers. Consolidate where possible.
## Review Checklist
- [ ] Is `sticky` used for section-scoped elements and `fixed` only for truly global UI?
- [ ] Does the fixed header compensate for its height with body padding?
- [ ] Does the bottom toolbar respect `env(safe-area-inset-bottom)` on mobile?
- [ ] Are all z-index values defined as named tokens, not arbitrary numbers?
- [ ] Is the total number of simultaneous fixed layers minimal — header + one bottom element maximum in most cases?
- [ ] Does content scrolling behind a fixed element not visually bleed through (background + shadow on the fixed element)?From dembrandt/dembrandt-skills, MIT.
More from dembrandt/dembrandt-skills
- 0.785score
app-shell
dembrandt
Top bar, sidebar rail, app launcher, tenant and environment cue, status bar.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
algorithmic-color-palette
dembrandt
Derive a full UI palette from one or two brand colours — state variants, brand-tinted greys, semantic colours.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
brand-visual-language
dembrandt
Shape language across type, radius and icons carries brand personality.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
button-states
dembrandt
Rest, hover, active, focus, disabled and loading states, derived from the base colour.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
authentic-product-representation
dembrandt
Product visuals must show the real product with real data.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
component-family-consistency
dembrandt
Buttons, inputs, badges and pills share radius, colour logic, shadow, border and spacing.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
data-display-and-selection
dembrandt
View modes, row selection, mass actions, sorting, filters, search and table patterns.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
domain-expert-configuration
dembrandt
Settings for experts who are not developers — domain language, sane defaults, grouping by professional concept.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
elevation-and-depth
dembrandt
Shadows and layering that lift elements above the surface.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
extract-design
dembrandt
Extract colours, typography, spacing, components and W3C design tokens from a live website with Dembrandt.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
color-mode-and-theme
dembrandt
Light, dark or both, and when a theme selector is worth it.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
generate-ui-from-brand
dembrandt
Pipeline from a URL or DESIGN.md to tokens, decisions and a UI spec.
SkillAFreshness: A★ 160Claude Code +9
Signals
- Stars
- 160
- Forks
- 20
- Open issues
- 0
- Last commit (this folder)
- Oct 1, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/dembrandt/dembrandt-skills
- Website
- www.dembrandt.com/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dembrandt
- 0.792score
Dembrandt
dembrandt
Design tokens from any live site: colours, type, spacing, components, drift against a baseline.
ConnectorAFreshness: ALocal★ 3.8KClaude Code +5 - 0.785score
authentic-product-representation
dembrandt
Product visuals must show the real product with real data.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
brand-visual-language
dembrandt
Shape language across type, radius and icons carries brand personality.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
button-states
dembrandt
Rest, hover, active, focus, disabled and loading states, derived from the base colour.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
color-mode-and-theme
dembrandt
Light, dark or both, and when a theme selector is worth it.
SkillAFreshness: A★ 160Claude Code +9 - 0.785score
app-shell
dembrandt
Top bar, sidebar rail, app launcher, tenant and environment cue, status bar.
SkillAFreshness: A★ 160Claude Code +9
Cite this page
sticky-and-fixed-elements skill. Agent Mart. https://agentmart.dev/skills/dembrandt-sticky-and-fixed-elements (last updated 2026-10-24)