Skip to main content
Designkufu

smarthr-ui-sectioning-content

SectioningContentは、header、footer、section、articleなどのセクショニング要素を表現するためのコンポーネントです。Headingと組み合わせて見出しレベルを自動計算するときに使います。

Stars
30
Source
kufu/smarthr-design-system
Updated
2026-05-29
Slug
kufu--smarthr-design-system--smarthr-ui-sectioning-content
View on GitHubRaw SKILL.md

// install — copy + paste into any project

mkdir -p .claude/skills && curl -fsSL https://raw.githubusercontent.com/kufu/smarthr-design-system/HEAD/plugins/smarthr-design-system/skills/smarthr-ui-sectioning-content/SKILL.md -o .claude/skills/smarthr-ui-sectioning-content.md

Drops the SKILL.md into .claude/skills/smarthr-ui-sectioning-content.md. Works with Claude Code, Cursor, and any agent that loads SKILL.md files from .claude/skills/.

header、footer、section、articleなどのセクショニング要素を表現するためのコンポーネントです。Headingと組み合わせて見出しレベルを自動計算するときに使います。

import

import { Section, Article, Aside, Nav } from 'smarthr-ui'

Props

Section

Props 名 デフォルト値 必須 説明
baseLevel number - - -

Article

Props 名 デフォルト値 必須 説明
baseLevel number - - -

Aside

Props 名 デフォルト値 必須 説明
baseLevel number - - -

Nav

Props 名 デフォルト値 必須 説明
baseLevel number - - -

実装ルール

a11y-heading-in-sectioning-content

HeadingコンポーネントをSectioningContent(Article, Aside, Nav, Section) のいずれかで囲むことを促すルールです。
同時にSectioningContentはHeadingを内包しているか、もチェックします

❌ NG:

// PageHeadingはSectiongContentでラップするとoutlineが乱れる可能性があるためNG
<Section>
  <PageHeading>
    hoge
  </PageHeading>
</Section>

✅ OK:

// SectioningContentにはHeadingを含む必要がある
<Section>
  <Heading>hoge</Heading>
  <Section>
    <Heading>fuga</Heading>
  </Section>
</Section>
// PageHeadingはSectioningContentで囲まない
<>
  <PageHeading>Page Name.</PageHeading>
  <Section>
    <Heading>hoge</Heading>
  </Section>
  <Center as="aside">
    <Heading>piyo</Heading>
  </Center>
</>

a11y-prohibit-sectioning-content-in-form

form, fieldset, smarthr-ui/Fieldset 以下でSectioningContent(section, aside, article, nav)が利用されている場合、smarthr-ui/Fieldset, fieldset要素に置き換えることを促すルールです。

❌ NG:

// form要素以下にSectionが存在するためNG
const AnyComponent = <form>
  <Section>
    <Heading>ANY TITLE.</Heading>
  </Section>
</form>

詳細は eslint-plugin-smarthr の各ルール README を参照してください。

使い方チェックリスト

使い方チェックリスト(Layer 3)は設定されていません。