<arc-section> Overview
Guidelines
When to use
- Use Section to divide landing pages into logical content bands (features, pricing, testimonials)
- Set the label prop for orientation -- it helps users scan the page structure at a glance
- Give each Section an id attribute so ScrollSpy and anchor links work correctly
- Pair Section with Container when you need an additional width constraint inside a full-bleed band
- Keep label text short -- one or two words is ideal for uppercase labels
When not to use
- Nest Section inside Section -- use a heading or Divider for sub-grouping instead
- Use Section as a generic flex container; it is a vertical spacing and labeling wrapper only
- Override the responsive padding without testing on mobile screens
- Rely on Section for navigation structure -- use PageLayout or SettingsLayout instead
- Place form elements directly inside Section without a Container for width constraint
Features
- Semantic <section> element for accessible document structure
- Optional uppercase label using --font-accent and --section-title-* tokens
- Consistent vertical padding (--space-3xl) that tightens on mobile at 768px
- Automatic horizontal centering at --max-width with --space-lg inline padding
- Built-in scroll-margin-top for correct anchor-link positioning under sticky headers
- Exposed CSS parts (section, label) for targeted ::part() styling
- Responsive padding reduction via a built-in media query
Preview
Usage
<arc-section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</arc-section> import { Section } from '@arclux/arc-ui-react';
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section> <script setup>
import { Section } from '@arclux/arc-ui-vue';
</script>
<template>
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section>
</template> <script>
import { Section } from '@arclux/arc-ui-svelte';
</script>
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section> import { Component } from '@angular/core';
import { Section } from '@arclux/arc-ui-angular';
@Component({
imports: [Section],
template: `
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section>
`,
})
export class MyComponent {} import { Section } from '@arclux/arc-ui-solid';
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section> import { Section } from '@arclux/arc-ui-preact';
<Section label="Features">
<h2>What We Offer</h2>
<p>Section content here.</p>
</Section> <!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-section — requires section.css + base.css (or arc-ui.css) -->
<div class="arc-section">
<section class="section">
Label
Section
</section>
</div> <!-- Auto-generated by @arclux/prism — do not edit manually -->
<!-- arc-section — self-contained, no external CSS needed -->
<style>
@media (max-width: 768px) {
.arc-section .section { padding: 64px 16px; }
}
</style>
<div class="arc-section" style="display: block">
<section class="section" style="width: 100%; max-width: 1120px; margin-inline: auto; padding: 96px 24px; scroll-margin-top: 16px">
Label
Section
</section>
</div> API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Section label displayed in uppercase above content |
See Also
- Container Max-width wrapper for page sections.
- Divider Horizontal rule with multiple visual styles from subtle to glowing.
- Page Layout Page structure primitive that arranges content into sidebar-left, sidebar-right, centered, or wide layouts using CSS Grid. Handles responsive collapse, configurable gap and max-width, and exposes named slots for sidebar, main, and aside regions.