<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>お問い合わせフォーム &#8211; ケケンタの独学ITブログ</title>
	<atom:link href="https://kekenta-it-blog.com/tag/%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0/feed/" rel="self" type="application/rss+xml" />
	<link>https://kekenta-it-blog.com</link>
	<description>プログラミングやWeb制作の情報を発信</description>
	<lastBuildDate>Wed, 13 Aug 2025 07:49:40 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://kekenta-it-blog.com/wp-content/uploads/2023/07/cropped-KEKENTA-BLOG-32x32.png</url>
	<title>お問い合わせフォーム &#8211; ケケンタの独学ITブログ</title>
	<link>https://kekenta-it-blog.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>【コピペOK】入力フォーム・ラジオボタン・セレクタなどのレイアウト紹介【Web制作】</title>
		<link>https://kekenta-it-blog.com/form-patterns-complete-guide/</link>
					<comments>https://kekenta-it-blog.com/form-patterns-complete-guide/#respond</comments>
		
		<dc:creator><![CDATA[ケケンタ]]></dc:creator>
		<pubDate>Wed, 13 Aug 2025 07:36:34 +0000</pubDate>
				<category><![CDATA[Web制作]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[お問い合わせフォーム]]></category>
		<category><![CDATA[入力フォーム]]></category>
		<guid isPermaLink="false">https://kekenta-it-blog.com/?p=16516</guid>

					<description><![CDATA[<p><img src="https://kekenta-it-blog.com/wp-content/uploads/2025/08/eye-catch__form-patterns-complete-guide__16516-1024x576.jpg" class="webfeedsFeaturedVisual" /></p>このようなお悩みにお応えするため、Webサイトのフォーム作成ですぐご活用いただけるレイアウトパターンをご紹介！   紹介するフォーム要素 各レイアウトのHTML・CSSコードをプレビュー付きで紹介しています。 基本フォー [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><img src="https://kekenta-it-blog.com/wp-content/uploads/2025/08/eye-catch__form-patterns-complete-guide__16516-1024x576.jpg" class="webfeedsFeaturedVisual" /></p><div class="swell-block-balloon"><div class="c-balloon -bln-left" data-col="gray"><div class="c-balloon__icon -circle"><img decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/困った顔-150x150.jpg" alt="" class="lazyload c-balloon__iconImg" width="80px" height="80px"><noscript><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/困った顔-150x150.jpg" alt="" class="c-balloon__iconImg" width="80px" height="80px"></noscript><span class="c-balloon__iconName">ケケンタ</span></div><div class="c-balloon__body -speaking -border-on"><div class="c-balloon__text">
<p>お問い合わせフォームのコーディングするの大変だな……</p>
<span class="c-balloon__shapes"><span class="c-balloon__before"></span><span class="c-balloon__after"></span></span></div></div></div></div>

<div class="swell-block-balloon"><div class="c-balloon -bln-left" data-col="gray"><div class="c-balloon__icon -circle"><img decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/困った顔-150x150.jpg" alt="" class="lazyload c-balloon__iconImg" width="80px" height="80px"><noscript><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/困った顔-150x150.jpg" alt="" class="c-balloon__iconImg" width="80px" height="80px"></noscript><span class="c-balloon__iconName">ケケンタ</span></div><div class="c-balloon__body -speaking -border-on"><div class="c-balloon__text">
<p>パーツだけサクッとコピーして使いたいな……</p>
<span class="c-balloon__shapes"><span class="c-balloon__before"></span><span class="c-balloon__after"></span></span></div></div></div></div>


<p class="wp-block-paragraph">このようなお悩みにお応えするため、Webサイトのフォーム作成ですぐご活用いただけるレイアウトパターンをご紹介！</p>



<p class="is-style-balloon_box wp-block-paragraph"><span data-icon="LsLightbulb" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDQ4IDQ4Ij48cGF0aCBkPSJNMzIgNDYuNUgxNmMtMS4xIDAtMi0uOS0yLTJzLjktMiAyLTJoMTZjMS4xIDAgMiAuOSAyIDJzLS45IDItMiAyek00MS43IDE1LjlDNDEuMyAxMyA0MCAxMC4zIDM4LjIgOCAzNC41IDMuMiAyOSAuOCAyMy4xIDEgMTQgMS40IDYuNSA4LjkgNiAxOGMtLjMgNiAyLjQgMTEuNyA3LjIgMTUuNC41LjQuOC45LjggMS41djEuNmMwIDIuMiAxLjggNCA0IDRoMTJjMi4yIDAgNC0xLjggNC00VjM1YzAtLjYuMy0xLjIuOS0xLjcgNS4zLTQgOC0xMC42IDYuOC0xNy40em0tNy4xIDEuN2gtLjNjLS43IDAtMS4zLS41LTEuNS0xLjItLjctMy4yLTMuMi01LjctNi40LTYuMy0uOC0uMS0xLjQtLjktMS4yLTEuN3MuOS0xLjQgMS43LTEuMmM0LjQuOCA4IDQuMiA4LjkgOC42LjEuOC0uNCAxLjYtMS4yIDEuOHoiPjwvcGF0aD48L3N2Zz4=)" aria-hidden="true" class="swl-inline-icon"> </span> <strong>紹介するフォーム要素</strong></p>



<ul class="wp-block-list is-style-num_circle -list-under-dashed">
<li>テキストフォーム</li>



<li>ラジオボタン</li>



<li>チェックボックス</li>



<li>テキストエリア</li>



<li>電話番号、メールアドレス、都道府県</li>
</ul>



<p class="is-style-icon_good wp-block-paragraph">各レイアウトのHTML・CSSコードをプレビュー付きで紹介しています。</p>


<div class="swell-block-balloon"><div class="c-balloon -bln-left" data-col="gray"><div class="c-balloon__icon -circle"><img decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="https://kekenta-it-blog.com/wp-content/uploads/2023/11/kekenta-icon-150x150.jpg" alt="" class="lazyload c-balloon__iconImg" width="80px" height="80px"><noscript><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2023/11/kekenta-icon-150x150.jpg" alt="" class="c-balloon__iconImg" width="80px" height="80px"></noscript><span class="c-balloon__iconName">ケケンタ</span></div><div class="c-balloon__body -speaking -border-on"><div class="c-balloon__text">
<p>コピペで簡単にサクッとご活用いただけます！<br>お役に立てば何よりです！</p>
<span class="c-balloon__shapes"><span class="c-balloon__before"></span><span class="c-balloon__after"></span></span></div></div></div></div>


<h2 class="wp-block-heading">基本フォームセクション</h2>



<p class="wp-block-paragraph">まずは簡単に、基本的なフォーム要素を含むサンプルフォームをご紹介します。こちらは、実際のWebサイトでよく使用される<strong>基本的なフォーム構成</strong>です。</p>



<form class="sample-form">
    <div class="form-group">
        <label class="form-label">
            お名前
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="name" 
               placeholder="山田 太郎"
               required>
    </div>

    <div class="form-group">
        <label class="form-label">お問い合わせ種別</label>
        <select class="form-input" name="inquiry_type">
            <option value="">選択してください</option>
            <option value="general">一般的なお問い合わせ</option>
            <option value="technical">技術的なお問い合わせ</option>
            <option value="billing">料金に関するお問い合わせ</option>
        </select>
    </div>

    <div class="form-group">
        <label class="form-label">お問い合わせ内容</label>
        <textarea class="form-textarea" 
                  name="message" 
                  rows="5" 
                  placeholder="お問い合わせ内容を詳しくお書きください"></textarea>
    </div>

    <div class="form-group">
        <label class="form-label">ご希望の連絡方法</label>
        <div class="radio-group">
            <div class="radio-item">
                <input type="radio" name="contact_method" id="email" value="email" checked>
                <label for="email">メール</label>
            </div>
            <div class="radio-item">
                <input type="radio" name="contact_method" id="phone" value="phone">
                <label for="phone">お電話</label>
            </div>
            <div class="radio-item">
                <input type="radio" name="contact_method" id="both" value="both">
                <label for="both">どちらでも可</label>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="form-label">追加サービス</label>
        <div class="checkbox-group">
            <div class="checkbox-item">
                <input type="checkbox" name="services[]" id="newsletter" value="newsletter">
                <label for="newsletter">ニュースレター配信を希望する</label>
            </div>
            <div class="checkbox-item">
                <input type="checkbox" name="services[]" id="updates" value="updates">
                <label for="updates">製品アップデート情報を受け取る</label>
            </div>
            <div class="checkbox-item">
                <input type="checkbox" name="services[]" id="events" value="events">
                <label for="events">イベント・セミナー情報を受け取る</label>
            </div>
        </div>
    </div>
</form>

<style>
/* 基本スタイル */
.sample-form {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    padding: 30px;
    background-color: #e7e7e7;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
.form-textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
.form-textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ラジオボタン・チェックボックス */
.radio-group,
.checkbox-group {
    margin-bottom: 15px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type="radio"],
.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label,
.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* ボタン */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;form class=&quot;sample-form&quot;&gt;
    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            お名前
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;name&quot; 
               placeholder=&quot;山田 太郎&quot;
               required&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;お問い合わせ種別&lt;/label&gt;
        &lt;select class=&quot;form-input&quot; name=&quot;inquiry_type&quot;&gt;
            &lt;option value=&quot;&quot;&gt;選択してください&lt;/option&gt;
            &lt;option value=&quot;general&quot;&gt;一般的なお問い合わせ&lt;/option&gt;
            &lt;option value=&quot;technical&quot;&gt;技術的なお問い合わせ&lt;/option&gt;
            &lt;option value=&quot;billing&quot;&gt;料金に関するお問い合わせ&lt;/option&gt;
        &lt;/select&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;お問い合わせ内容&lt;/label&gt;
        &lt;textarea class=&quot;form-textarea&quot; 
                  name=&quot;message&quot; 
                  rows=&quot;5&quot; 
                  placeholder=&quot;お問い合わせ内容を詳しくお書きください&quot;&gt;&lt;/textarea&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;ご希望の連絡方法&lt;/label&gt;
        &lt;div class=&quot;radio-group&quot;&gt;
            &lt;div class=&quot;radio-item&quot;&gt;
                &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;email&quot; value=&quot;email&quot; checked&gt;
                &lt;label for=&quot;email&quot;&gt;メール&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class=&quot;radio-item&quot;&gt;
                &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;phone&quot; value=&quot;phone&quot;&gt;
                &lt;label for=&quot;phone&quot;&gt;お電話&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class=&quot;radio-item&quot;&gt;
                &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;both&quot; value=&quot;both&quot;&gt;
                &lt;label for=&quot;both&quot;&gt;どちらでも可&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;追加サービス&lt;/label&gt;
        &lt;div class=&quot;checkbox-group&quot;&gt;
            &lt;div class=&quot;checkbox-item&quot;&gt;
                &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;newsletter&quot; value=&quot;newsletter&quot;&gt;
                &lt;label for=&quot;newsletter&quot;&gt;ニュースレター配信を希望する&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class=&quot;checkbox-item&quot;&gt;
                &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;updates&quot; value=&quot;updates&quot;&gt;
                &lt;label for=&quot;updates&quot;&gt;製品アップデート情報を受け取る&lt;/label&gt;
            &lt;/div&gt;
            &lt;div class=&quot;checkbox-item&quot;&gt;
                &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;events&quot; value=&quot;events&quot;&gt;
                &lt;label for=&quot;events&quot;&gt;イベント・セミナー情報を受け取る&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/form&gt;
</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 基本スタイル */
.sample-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
.form-textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
.form-textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ラジオボタン・チェックボックス */
.radio-group,
.checkbox-group {
    margin-bottom: 15px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type=&quot;radio&quot;],
.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label,
.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* ボタン */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}</code></pre></div>
</div></details>
</div>



<p class="is-style-icon_good u-mb-ctrl u-mb-30 wp-block-paragraph">基本的なお問い合わせフォームであれば、このサンプルフォームのコードをそのままお使いいただけるかと思います。</p>


<div class="swell-block-balloon"><div class="c-balloon -bln-left" data-col="gray"><div class="c-balloon__icon -circle"><img decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="https://kekenta-it-blog.com/wp-content/uploads/2023/11/kekenta-icon-150x150.jpg" alt="" class="lazyload c-balloon__iconImg" width="80px" height="80px"><noscript><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2023/11/kekenta-icon-150x150.jpg" alt="" class="c-balloon__iconImg" width="80px" height="80px"></noscript><span class="c-balloon__iconName">ケケンタ</span></div><div class="c-balloon__body -speaking -border-on"><div class="c-balloon__text">
<p>それでは以下より、テキストフォームやラジオボタンなど、<span class="swl-marker mark_yellow">入力フォーム要素ごとの<strong>レイアウトパターン</strong></span>をご紹介していきます。<br><br>「必須」アイコンの有無や縦並び・横並びなど、わずかな違いではありますが、すべてイチから作成しようとすると意外と手間がかかります。ぜひコピペでサクッとご活用いただければと思います！</p>
<span class="c-balloon__shapes"><span class="c-balloon__before"></span><span class="c-balloon__after"></span></span></div></div></div></div>


<p class="is-style-bg_stripe wp-block-paragraph">記事の後半では<code>pattern</code>属性による入力制御機能付きの電話番号・郵便番号フォームもご紹介しています。ぜひご覧いただけるとうれしいです！</p>



<h2 class="wp-block-heading">テキストフォーム</h2>



<h3 class="wp-block-heading">通常パターン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にテキスト入力フィールドを配置する基本的なパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">
        お名前
        <span class="required-text">必須</span>
    </label>
    <input type="text" 
           class="form-input" 
           name="name" 
           placeholder="山田 太郎"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
    background-color: #e7e7e7;
    padding: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        お名前
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;text&quot; 
           class=&quot;form-input&quot; 
           name=&quot;name&quot; 
           placeholder=&quot;山田 太郎&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}</code></pre></div>
</div></details>
</div>



<h3 class="wp-block-heading">横並び</h3>



<p class="wp-block-paragraph">ラベルと入力フィールドを横に並べて配置し、スペースを効率的に使用するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout">
    <label class="form-label">
        お名前
        <span class="required-text">必須</span>
    </label>
    <input type="text" 
           class="form-input" 
           name="name" 
           placeholder="山田 太郎"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        お名前
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;text&quot; 
           class=&quot;form-input&quot; 
           name=&quot;name&quot; 
           placeholder=&quot;山田 太郎&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">苗字・名前分割</h3>



<p class="wp-block-paragraph">姓名を別々のフィールドに分けて入力してもらうパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="name-split">
    <div class="form-group">
        <label class="form-label">
            苗字
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="lastname" 
               placeholder="山田"
               required>
    </div>

    <div class="form-group">
        <label class="form-label">
            名前
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="firstname" 
               placeholder="太郎"
               required>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 苗字・名前分割 */
.name-split {
    display: flex;
    gap: 30px;
    background-color: #e7e7e7;
}

.name-split .form-group {
    flex: 1;
    margin-bottom: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;name-split&quot;&gt;
    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            苗字
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;lastname&quot; 
               placeholder=&quot;山田&quot;
               required&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            名前
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;firstname&quot; 
               placeholder=&quot;太郎&quot;
               required&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 苗字・名前分割 */
.name-split {
    display: flex;
    gap: 30px;
}

.name-split .form-group {
    flex: 1;
    margin-bottom: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">苗字・名前分割＋横並び</h3>



<p class="wp-block-paragraph">姓名分割と横並びレイアウトを組み合わせたパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="name-split">
    <div class="form-group horizontal-layout">
        <label class="form-label">
            苗字
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="lastname" 
               placeholder="山田"
               required>
    </div>

    <div class="form-group horizontal-layout">
        <label class="form-label">
            名前
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="firstname" 
               placeholder="太郎"
               required>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 苗字・名前分割 */
.name-split {
    display: flex;
    gap: 30px;
}

.name-split .form-group {
    flex: 1;
    margin-bottom: 0;
}

.name-split .horizontal-layout .form-label {
    min-width: 50px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;name-split&quot;&gt;
    &lt;div class=&quot;form-group horizontal-layout&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            苗字
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;lastname&quot; 
               placeholder=&quot;山田&quot;
               required&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group horizontal-layout&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            名前
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;firstname&quot; 
               placeholder=&quot;太郎&quot;
               required&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 苗字・名前分割 */
.name-split {
    display: flex;
    gap: 30px;
}

.name-split .form-group {
    flex: 1;
    margin-bottom: 0;
}

.name-split .horizontal-layout .form-label {
    min-width: 50px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">苗字・名前分割＋縦並び</h3>



<p class="wp-block-paragraph">姓名分割と縦並びレイアウトを組み合わせたパターン</p>



<div class="name-split-vertical">
    <div class="form-group">
        <label class="form-label">
            苗字
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="lastname" 
               placeholder="山田"
               required>
    </div>

    <div class="form-group">
        <label class="form-label">
            名前
            <span class="required-text">必須</span>
        </label>
        <input type="text" 
               class="form-input" 
               name="firstname" 
               placeholder="太郎"
               required>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 苗字・名前分割（縦並び） */
.name-split-vertical {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: #e7e7e7;
}

.name-split-vertical .form-group {
    flex: 1;
    margin-bottom: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;name-split-vertical&quot;&gt;
    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            苗字
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;lastname&quot; 
               placeholder=&quot;山田&quot;
               required&gt;
    &lt;/div&gt;

    &lt;div class=&quot;form-group&quot;&gt;
        &lt;label class=&quot;form-label&quot;&gt;
            名前
            &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
        &lt;/label&gt;
        &lt;input type=&quot;text&quot; 
               class=&quot;form-input&quot; 
               name=&quot;firstname&quot; 
               placeholder=&quot;太郎&quot;
               required&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 苗字・名前分割（縦並び） */
.name-split-vertical {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.name-split-vertical .form-group {
    flex: 1;
    margin-bottom: 0;
}</code></pre></div>
</div></details>
</div>



<h2 class="wp-block-heading">ラジオボタン</h2>



<h3 class="wp-block-heading">通常パターン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にラジオボタンを縦並びで配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">ご希望の連絡方法</label>
    <div class="radio-group">
        <div class="radio-item">
            <input type="radio" name="contact_method_nomal" id="email-nomal" value="email" checked>
            <label for="email-nomal">メール</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_nomal" id="phone-nomal" value="phone">
            <label for="phone-nomal">お電話</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_nomal" id="both-nomal" value="both">
            <label for="both-nomal">どちらでも可</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;ご希望の連絡方法&lt;/label&gt;
    &lt;div class=&quot;radio-group&quot;&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;email&quot; value=&quot;email&quot; checked&gt;
            &lt;label for=&quot;email&quot;&gt;メール&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;phone&quot; value=&quot;phone&quot;&gt;
            &lt;label for=&quot;phone&quot;&gt;お電話&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;both&quot; value=&quot;both&quot;&gt;
            &lt;label for=&quot;both&quot;&gt;どちらでも可&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type=&quot;radio&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">横並び＋ラジオ要素が縦並び</h3>



<p class="wp-block-paragraph">ラベルとラジオボタン全体を横に並べ、各ラジオボタンは縦に配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">ご希望の連絡方法</label>
    <div class="radio-group vertical-options">
        <div class="radio-item">
            <input type="radio" name="contact_method_second" id="email-second" value="email" checked>
            <label for="email-second">メール</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_second" id="phone-second" value="phone">
            <label for="phone-second">お電話</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_second" id="both-second" value="both">
            <label for="both-second">どちらでも可</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .radio-group {
    flex: 1;
    margin-bottom: 0;
}

.vertical-options .radio-item {
    display: block;
    margin-bottom: 8px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;ご希望の連絡方法&lt;/label&gt;
    &lt;div class=&quot;radio-group vertical-options&quot;&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;email&quot; value=&quot;email&quot; checked&gt;
            &lt;label for=&quot;email&quot;&gt;メール&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;phone&quot; value=&quot;phone&quot;&gt;
            &lt;label for=&quot;phone&quot;&gt;お電話&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;both&quot; value=&quot;both&quot;&gt;
            &lt;label for=&quot;both&quot;&gt;どちらでも可&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type=&quot;radio&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .radio-group {
    flex: 1;
    margin-bottom: 0;
}

.vertical-options .radio-item {
    display: block;
    margin-bottom: 8px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">縦並び＋ラジオ要素が横並び</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にラジオボタンを横並びで配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">ご希望の連絡方法</label>
    <div class="radio-group horizontal-items">
        <div class="radio-item">
            <input type="radio" name="contact_method_third" id="email-third" value="email" checked>
            <label for="email-third">メール</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_third" id="phone-third" value="phone">
            <label for="phone">お電話</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_third" id="both-third" value="both">
            <label for="both-third">どちらでも可</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .radio-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;ご希望の連絡方法&lt;/label&gt;
    &lt;div class=&quot;radio-group horizontal-items&quot;&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;email&quot; value=&quot;email&quot; checked&gt;
            &lt;label for=&quot;email&quot;&gt;メール&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;phone&quot; value=&quot;phone&quot;&gt;
            &lt;label for=&quot;phone&quot;&gt;お電話&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;both&quot; value=&quot;both&quot;&gt;
            &lt;label for=&quot;both&quot;&gt;どちらでも可&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type=&quot;radio&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .radio-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">横並び＋ラジオ要素が横並び</h3>



<p class="wp-block-paragraph">ラベルとラジオボタン全体を横に並べ、ラジオボタン自体も横並びにするパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">ご希望の連絡方法</label>
    <div class="radio-group horizontal-items">
        <div class="radio-item">
            <input type="radio" name="contact_method_fourth" id="email-fourth" value="email" checked>
            <label for="email-fourth">メール</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_fourth" id="phone-fourth" value="phone">
            <label for="phone-fourth">お電話</label>
        </div>
        <div class="radio-item">
            <input type="radio" name="contact_method_fourth" id="both-fourth" value="both">
            <label for="both-fourth">どちらでも可</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .radio-group {
    flex: 1;
    margin-bottom: 0;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .radio-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;ご希望の連絡方法&lt;/label&gt;
    &lt;div class=&quot;radio-group horizontal-items&quot;&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;email&quot; value=&quot;email&quot; checked&gt;
            &lt;label for=&quot;email&quot;&gt;メール&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;phone&quot; value=&quot;phone&quot;&gt;
            &lt;label for=&quot;phone&quot;&gt;お電話&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;radio-item&quot;&gt;
            &lt;input type=&quot;radio&quot; name=&quot;contact_method&quot; id=&quot;both&quot; value=&quot;both&quot;&gt;
            &lt;label for=&quot;both&quot;&gt;どちらでも可&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* ラジオボタン */
.radio-group {
    margin-bottom: 15px;
}

.radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-item input[type=&quot;radio&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .radio-group {
    flex: 1;
    margin-bottom: 0;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .radio-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">チェックボックス</h2>



<h3 class="wp-block-heading">通常パターン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にチェックボックスを縦並びで配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">追加サービス</label>
    <div class="checkbox-group">
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="newsletter-01" value="newsletter">
            <label for="newsletter-01">ニュースレター配信を希望する</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="updates-01" value="updates">
            <label for="updates-01">製品アップデート情報を受け取る</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="events-01" value="events">
            <label for="events-01">イベント・セミナー情報を受け取る</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;追加サービス&lt;/label&gt;
    &lt;div class=&quot;checkbox-group&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;newsletter&quot; value=&quot;newsletter&quot;&gt;
            &lt;label for=&quot;newsletter&quot;&gt;ニュースレター配信を希望する&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;updates&quot; value=&quot;updates&quot;&gt;
            &lt;label for=&quot;updates&quot;&gt;製品アップデート情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;events&quot; value=&quot;events&quot;&gt;
            &lt;label for=&quot;events&quot;&gt;イベント・セミナー情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">縦並び＋チェックボックスが横並び</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にチェックボックスを横並びで配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">追加サービス</label>
    <div class="checkbox-group horizontal-items">
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="newsletter-02" value="newsletter">
            <label for="newsletter-02">ニュースレター配信を希望する</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="updates-02" value="updates">
            <label for="updates-02">製品アップデート情報を受け取る</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="events-02" value="events">
            <label for="events-02">イベント・セミナー情報を受け取る</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;追加サービス&lt;/label&gt;
    &lt;div class=&quot;checkbox-group horizontal-items&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;newsletter&quot; value=&quot;newsletter&quot;&gt;
            &lt;label for=&quot;newsletter&quot;&gt;ニュースレター配信を希望する&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;updates&quot; value=&quot;updates&quot;&gt;
            &lt;label for=&quot;updates&quot;&gt;製品アップデート情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;events&quot; value=&quot;events&quot;&gt;
            &lt;label for=&quot;events&quot;&gt;イベント・セミナー情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">横並び＋チェックボックスが縦並び</h3>



<p class="wp-block-paragraph">ラベルとチェックボックス全体を横に並べ、各チェックボックスは縦に配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">追加サービス</label>
    <div class="checkbox-group vertical-options">
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="newsletter-03" value="newsletter">
            <label for="newsletter-03">ニュースレター配信を希望する</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="updates-03" value="updates">
            <label for="updates-03">製品アップデート情報を受け取る</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="events-03" value="events">
            <label for="events-03">イベント・セミナー情報を受け取る</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

.vertical-options .checkbox-item {
    display: block;
    margin-bottom: 8px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;追加サービス&lt;/label&gt;
    &lt;div class=&quot;checkbox-group vertical-options&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;newsletter&quot; value=&quot;newsletter&quot;&gt;
            &lt;label for=&quot;newsletter&quot;&gt;ニュースレター配信を希望する&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;updates&quot; value=&quot;updates&quot;&gt;
            &lt;label for=&quot;updates&quot;&gt;製品アップデート情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;events&quot; value=&quot;events&quot;&gt;
            &lt;label for=&quot;events&quot;&gt;イベント・セミナー情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

.vertical-options .checkbox-item {
    display: block;
    margin-bottom: 8px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">横並び＋チェックボックスが横並び</h3>



<p class="wp-block-paragraph">ラベルとチェックボックス全体を横に並べ、チェックボックス自体も横並びにするパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">追加サービス</label>
    <div class="checkbox-group horizontal-items">
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="newsletter-04" value="newsletter">
            <label for="newsletter-04">ニュースレター配信を希望する</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="updates-04" value="updates">
            <label for="updates-04">製品アップデート情報を受け取る</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="services[]" id="events-04" value="events">
            <label for="events-04">イベント・セミナー情報を受け取る</label>
        </div>
    </div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;追加サービス&lt;/label&gt;
    &lt;div class=&quot;checkbox-group horizontal-items&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;newsletter&quot; value=&quot;newsletter&quot;&gt;
            &lt;label for=&quot;newsletter&quot;&gt;ニュースレター配信を希望する&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;updates&quot; value=&quot;updates&quot;&gt;
            &lt;label for=&quot;updates&quot;&gt;製品アップデート情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;services[]&quot; id=&quot;events&quot; value=&quot;events&quot;&gt;
            &lt;label for=&quot;events&quot;&gt;イベント・セミナー情報を受け取る&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* チェックボックス */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* 横並びアイテム */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">縦並び＋チェックボックスが縦並び＋必須アイコン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にチェックボックスを縦並びで配置</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">
        必須サービス選択
        <span class="required-text">必須</span>
    </label>
    <div class="checkbox-group">
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service1-05" value="service1" required>
            <label for="service1-05">基本サービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service2-05" value="service2" required>
            <label for="service2-05">プレミアムサービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service3-05" value="service3" required>
            <label for="service3-05">サポートサービス</label>
        </div>
    </div>
    <div class="help-text">最低1つは選択してください</div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        必須サービス選択
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;div class=&quot;checkbox-group&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service1&quot; value=&quot;service1&quot; required&gt;
            &lt;label for=&quot;service1&quot;&gt;基本サービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service2&quot; value=&quot;service2&quot; required&gt;
            &lt;label for=&quot;service2&quot;&gt;プレミアムサービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service3&quot; value=&quot;service3&quot; required&gt;
            &lt;label for=&quot;service3&quot;&gt;サポートサービス&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;help-text&quot;&gt;最低1つは選択してください&lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}</code></pre></div>
</div></details>
</div>



<h3 class="wp-block-heading">縦並び＋チェックボックスが横並び＋必須アイコン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にチェックボックスを横並びで配置</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">
        必須サービス選択
        <span class="required-text">必須</span>
    </label>
    <div class="checkbox-group horizontal-items">
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service1-06" value="service1" required>
            <label for="service1-06">基本サービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service2-06" value="service2" required>
            <label for="service2-06">プレミアムサービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service3-06" value="service3" required>
            <label for="service3-06">サポートサービス</label>
        </div>
    </div>
    <div class="help-text">最低1つは選択してください</div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* チェックボックス横並び */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        必須サービス選択
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;div class=&quot;checkbox-group horizontal-items&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service1&quot; value=&quot;service1&quot; required&gt;
            &lt;label for=&quot;service1&quot;&gt;基本サービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service2&quot; value=&quot;service2&quot; required&gt;
            &lt;label for=&quot;service2&quot;&gt;プレミアムサービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service3&quot; value=&quot;service3&quot; required&gt;
            &lt;label for=&quot;service3&quot;&gt;サポートサービス&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;help-text&quot;&gt;最低1つは選択してください&lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* チェックボックス横並び */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<h3 class="wp-block-heading">横並び+チェックボックスが縦並び＋必須アイコン</h3>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">
        必須サービス選択
        <span class="required-text">必須</span>
    </label>
    <div class="checkbox-group vertical-options">
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service1-07" value="service1" required>
            <label for="service1-07">基本サービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service2-07" value="service2" required>
            <label for="service2-07">プレミアムサービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service3-07" value="service3" required>
            <label for="service3-07">サポートサービス</label>
        </div>
    </div>
    <div class="help-text">最低1つは選択してください</div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* 縦並びオプション */
.vertical-options .checkbox-item {
    display: block;
    margin-bottom: 8px;
}

.vertical-options input[type="checkbox"] {
    margin-right: 8px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        必須サービス選択
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;div class=&quot;checkbox-group vertical-options&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service1&quot; value=&quot;service1&quot; required&gt;
            &lt;label for=&quot;service1&quot;&gt;基本サービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service2&quot; value=&quot;service2&quot; required&gt;
            &lt;label for=&quot;service2&quot;&gt;プレミアムサービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service3&quot; value=&quot;service3&quot; required&gt;
            &lt;label for=&quot;service3&quot;&gt;サポートサービス&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;help-text&quot;&gt;最低1つは選択してください&lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* 縦並びオプション */
.vertical-options .checkbox-item {
    display: block;
    margin-bottom: 8px;
}

.vertical-options input[type=&quot;checkbox&quot;] {
    margin-right: 8px;
}</code></pre></div>
</div></details>
</div>



<h3 class="wp-block-heading">横並び+チェックボックスが横並び＋必須アイコン</h3>



<p class="wp-block-paragraph">ラベルとチェックボックス全体を横に並べ、チェックボックス自体も横並びにする</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-options">
    <label class="form-label">
        必須サービス選択
        <span class="required-text">必須</span>
    </label>
    <div class="checkbox-group horizontal-items">
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service1-08" value="service1" required>
            <label for="service1-08">基本サービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service2-08" value="service2" required>
            <label for="service2-08">プレミアムサービス</label>
        </div>
        <div class="checkbox-item">
            <input type="checkbox" name="required_services[]" id="service3-08" value="service3" required>
            <label for="service3-08">サポートサービス</label>
        </div>
    </div>
    <div class="help-text">最低1つは選択してください</div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* チェックボックス横並び */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-options&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        必須サービス選択
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;div class=&quot;checkbox-group horizontal-items&quot;&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service1&quot; value=&quot;service1&quot; required&gt;
            &lt;label for=&quot;service1&quot;&gt;基本サービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service2&quot; value=&quot;service2&quot; required&gt;
            &lt;label for=&quot;service2&quot;&gt;プレミアムサービス&lt;/label&gt;
        &lt;/div&gt;
        &lt;div class=&quot;checkbox-item&quot;&gt;
            &lt;input type=&quot;checkbox&quot; name=&quot;required_services[]&quot; id=&quot;service3&quot; value=&quot;service3&quot; required&gt;
            &lt;label for=&quot;service3&quot;&gt;サポートサービス&lt;/label&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;help-text&quot;&gt;最低1つは選択してください&lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.checkbox-item input[type=&quot;checkbox&quot;] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 横並びレイアウト */
.horizontal-options {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.horizontal-options .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-options .checkbox-group {
    flex: 1;
    margin-bottom: 0;
}

/* チェックボックス横並び */
.horizontal-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.horizontal-items .checkbox-item {
    margin-bottom: 0;
    margin-right: 20px;
}</code></pre></div>
</div></details>
</div>



<h2 class="wp-block-heading">テキストエリア</h2>



<h3 class="wp-block-heading">通常パターン</h3>



<p class="wp-block-paragraph">ラベルを上に配置し、その下にテキストエリアを配置する基本的なパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">お問い合わせ内容</label>
    <textarea class="form-textarea" 
              name="message" 
              rows="5" 
              placeholder="お問い合わせ内容を詳しくお書きください"></textarea>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;お問い合わせ内容&lt;/label&gt;
    &lt;textarea class=&quot;form-textarea&quot; 
              name=&quot;message&quot; 
              rows=&quot;5&quot; 
              placeholder=&quot;お問い合わせ内容を詳しくお書きください&quot;&gt;&lt;/textarea&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">横並び</h3>



<p class="wp-block-paragraph">ラベルとテキストエリアを横に並べて配置するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout">
    <label class="form-label">お問い合わせ内容</label>
    <textarea class="form-textarea" 
              name="message" 
              rows="5" 
              placeholder="お問い合わせ内容を詳しくお書きください"></textarea>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-textarea {
    flex: 1;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;お問い合わせ内容&lt;/label&gt;
    &lt;textarea class=&quot;form-textarea&quot; 
              name=&quot;message&quot; 
              rows=&quot;5&quot; 
              placeholder=&quot;お問い合わせ内容を詳しくお書きください&quot;&gt;&lt;/textarea&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-textarea {
    flex: 1;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">縦並び＋必須アイコン</h3>



<p class="wp-block-paragraph">テキストエリアは常にラベルを上に配置し、画面幅いっぱいに表示</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">
        お問い合わせ内容
        <span class="required-text">必須</span>
    </label>
    <textarea class="textarea" 
              name="message" 
              placeholder="お問い合わせ内容を詳しくお書きください"
              required></textarea>
    <div class="help-text">500文字以内でご記入ください</div>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea::placeholder {
    color: #9ca3af;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        お問い合わせ内容
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;textarea class=&quot;textarea&quot; 
              name=&quot;message&quot; 
              placeholder=&quot;お問い合わせ内容を詳しくお聞かせください。&#10;&#10;例：&#10;・具体的なご質問内容&#10;・ご要望の詳細&#10;・お困りの状況&#10;・ご希望の対応方法&quot;
              required&gt;&lt;/textarea&gt;
    &lt;div class=&quot;help-text&quot;&gt;500文字以内でご記入ください&lt;/div&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea::placeholder {
    color: #9ca3af;
}

.help-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}</code></pre></div>
</div></details>
</div>



<h2 class="wp-block-heading">固有パターンの入力フォーム</h2>



<h3 class="wp-block-heading">【郵便番号①】通常パターン</h3>



<p class="wp-block-paragraph">郵便番号の入力形式を制限し、ハイフンなしの7桁数字のみ受け付けるパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group postal-code-wrapper">
    <label class="form-label">
        郵便番号
        <span class="required-text">必須</span>
    </label>
    <input type="text" 
           class="form-input" 
           name="postal_code" 
           placeholder="1234567"
           pattern="[0-9]{7}"
           maxlength="7"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 郵便番号用の横幅制限 */
.postal-code-wrapper .form-input {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group postal-code-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        郵便番号
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;text&quot; 
           class=&quot;form-input&quot; 
           name=&quot;postal_code&quot; 
           placeholder=&quot;1234567&quot;
           pattern=&quot;[0-9]{7}&quot;
           maxlength=&quot;7&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 郵便番号用の横幅制限 */
.postal-code-wrapper .form-input {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【郵便番号②】横並び</h3>



<p class="wp-block-paragraph">郵便番号でラベルと入力フィールドを横に並べ、適切な横幅制限を設けたパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout postal-code-wrapper">
    <label class="form-label">
        郵便番号
        <span class="required-text">必須</span>
    </label>
    <input type="text" 
           class="form-input" 
           name="postal_code_horizontal" 
           placeholder="1234567"
           pattern="[0-9]{7}"
           maxlength="7"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 郵便番号用の横幅制限 */
.postal-code-wrapper .form-input {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout postal-code-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        郵便番号
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;text&quot; 
           class=&quot;form-input&quot; 
           name=&quot;postal_code_horizontal&quot; 
           placeholder=&quot;1234567&quot;
           pattern=&quot;[0-9]{7}&quot;
           maxlength=&quot;7&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 郵便番号用の横幅制限 */
.postal-code-wrapper .form-input {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【都道府県①】通常パターン</h3>



<p class="wp-block-paragraph">都道府県を選択するプルダウンメニューのパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group prefecture-wrapper">
    <label class="form-label">
        都道府県
        <span class="required-text">必須</span>
    </label>
    <select class="form-input" name="prefecture" required>
        <option value="">選択してください</option>
        <option value="tokyo">東京都</option>
        <option value="osaka">大阪府</option>
        <option value="kyoto">京都府</option>
        <option value="hokkaido">北海道</option>
        <option value="okinawa">沖縄県</option>
    </select>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 都道府県用の横幅制限 */
.prefecture-wrapper .form-input,
.prefecture-wrapper select {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group prefecture-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        都道府県
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;select class=&quot;form-input&quot; name=&quot;prefecture&quot; required&gt;
        &lt;option value=&quot;&quot;&gt;選択してください&lt;/option&gt;
        &lt;option value=&quot;tokyo&quot;&gt;東京都&lt;/option&gt;
        &lt;option value=&quot;osaka&quot;&gt;大阪府&lt;/option&gt;
        &lt;option value=&quot;kyoto&quot;&gt;京都府&lt;/option&gt;
        &lt;option value=&quot;hokkaido&quot;&gt;北海道&lt;/option&gt;
        &lt;option value=&quot;okinawa&quot;&gt;沖縄県&lt;/option&gt;
    &lt;/select&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 都道府県用の横幅制限 */
.prefecture-wrapper .form-input,
.prefecture-wrapper select {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【都道府県②】横並び</h3>



<p class="wp-block-paragraph">都道府県でラベルとプルダウンメニューを横に並べ、適切な横幅制限を設けたパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout prefecture-wrapper">
    <label class="form-label">
        都道府県
        <span class="required-text">必須</span>
    </label>
    <select class="form-input" name="prefecture_horizontal" required>
        <option value="">選択してください</option>
        <option value="tokyo">東京都</option>
        <option value="osaka">大阪府</option>
        <option value="kyoto">京都府</option>
        <option value="hokkaido">北海道</option>
        <option value="okinawa">沖縄県</option>
    </select>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input,
.horizontal-layout select {
    flex: 1;
}

/* 都道府県用の横幅制限 */
.prefecture-wrapper .form-input,
.prefecture-wrapper select {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout prefecture-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        都道府県
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;select class=&quot;form-input&quot; name=&quot;prefecture_horizontal&quot; required&gt;
        &lt;option value=&quot;&quot;&gt;選択してください&lt;/option&gt;
        &lt;option value=&quot;tokyo&quot;&gt;東京都&lt;/option&gt;
        &lt;option value=&quot;osaka&quot;&gt;大阪府&lt;/option&gt;
        &lt;option value=&quot;kyoto&quot;&gt;京都府&lt;/option&gt;
        &lt;option value=&quot;hokkaido&quot;&gt;北海道&lt;/option&gt;
        &lt;option value=&quot;okinawa&quot;&gt;沖縄県&lt;/option&gt;
    &lt;/select&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input,
.horizontal-layout select {
    flex: 1;
}

/* 都道府県用の横幅制限 */
.prefecture-wrapper .form-input,
.prefecture-wrapper select {
    width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【メールアドレス①】通常パターン</h3>



<p class="wp-block-paragraph">メールアドレスの形式を制限するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group">
    <label class="form-label">
        メールアドレス
        <span class="required-text">必須</span>
    </label>
    <input type="email" 
           class="form-input" 
           name="email" 
           placeholder="example@example.com"
           pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        メールアドレス
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;email&quot; 
           class=&quot;form-input&quot; 
           name=&quot;email&quot; 
           placeholder=&quot;example@example.com&quot;
           pattern=&quot;[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【メールアドレス②】横並び</h3>



<p class="wp-block-paragraph">ラベルとメールアドレス入力フィールドを横に並べて配置</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout">
    <label class="form-label">
        メールアドレス
        <span class="required-text">必須</span>
    </label>
    <input type="email" 
           class="form-input" 
           name="email_horizontal" 
           placeholder="example@domain.com"
           pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        メールアドレス
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;email&quot; 
           class=&quot;form-input&quot; 
           name=&quot;email_horizontal&quot; 
           placeholder=&quot;example@domain.com&quot;
           pattern=&quot;[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}</code></pre></div>
</div></details>
</div>



<h3 class="wp-block-heading">【電話番号①】通常パターン</h3>



<p class="wp-block-paragraph">電話番号の形式を制限するパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group phone-wrapper">
    <label class="form-label">
        電話番号
        <span class="required-text">必須</span>
    </label>
    <input type="tel" 
           class="form-input" 
           name="phone" 
           placeholder="09012345678"
           pattern="[0-9]{10,11}"
           maxlength="11"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 電話番号用の横幅制限 */
.phone-wrapper .form-input {
    width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group phone-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        電話番号
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;tel&quot; 
           class=&quot;form-input&quot; 
           name=&quot;phone&quot; 
           placeholder=&quot;09012345678&quot;
           pattern=&quot;[0-9]{10,11}&quot;
           maxlength=&quot;11&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 電話番号用の横幅制限 */
.phone-wrapper .form-input {
    width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">【電話番号②】横並び</h3>



<p class="wp-block-paragraph">電話番号でラベルと入力フィールドを横に並べ、適切な横幅制限を設けたパターン</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="form-group horizontal-layout phone-wrapper">
    <label class="form-label">
        電話番号
        <span class="required-text">必須</span>
    </label>
    <input type="tel" 
           class="form-input" 
           name="phone_horizontal" 
           placeholder="09012345678"
           pattern="[0-9]{10,11}"
           maxlength="11"
           required>
</div>

<style>
/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 電話番号用の横幅制限 */
.phone-wrapper .form-input {
    width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}
</style>



<div class="swell-block-accordion is-style-simple">
<details class="swell-block-accordion__item" data-swl-acc="wrapper"><summary class="swell-block-accordion__title" data-swl-acc="header"><span class="swell-block-accordion__label"><span data-icon="FasCode" data-id="0" style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDY0MCA1MTIiPjxwYXRoIGQ9Ik0zOTIuOCAxLjJjLTE3LTQuOS0zNC43IDUtMzkuNiAyMmwtMTI4IDQ0OGMtNC45IDE3IDUgMzQuNyAyMiAzOS42czM0LjctNSAzOS42LTIybDEyOC00NDhjNC45LTE3LTUtMzQuNy0yMi0zOS42em04MC42IDEyMC4xYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM0w1NjIuNyAyNTZsLTg5LjQgODkuNGMtMTIuNSAxMi41LTEyLjUgMzIuOCAwIDQ1LjNzMzIuOCAxMi41IDQ1LjMgMGwxMTItMTEyYzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zbC0xMTItMTEyYy0xMi41LTEyLjUtMzIuOC0xMi41LTQ1LjMgMHptLTMwNi43IDBjLTEyLjUtMTIuNS0zMi44LTEyLjUtNDUuMyAwbC0xMTIgMTEyYy0xMi41IDEyLjUtMTIuNSAzMi44IDAgNDUuM2wxMTIgMTEyYzEyLjUgMTIuNSAzMi44IDEyLjUgNDUuMyAwczEyLjUtMzIuOCAwLTQ1LjNMNzcuMyAyNTZsODkuNC04OS40YzEyLjUtMTIuNSAxMi41LTMyLjggMC00NS4zeiI+PC9wYXRoPjwvc3ZnPg==)" aria-hidden="true" class="swl-inline-icon"> </span><strong> ソースコード</strong></span><span class="swell-block-accordion__icon c-switchIconBtn" data-swl-acc="icon" aria-hidden="true" data-opened="false"><i class="__icon--closed icon-plus"></i><i class="__icon--opened icon-minus"></i></span></summary><div class="swell-block-accordion__body" data-swl-acc="body">
<div class="hcb_wrap"><pre class="prism line-numbers lang-html" data-lang="HTML"><code>&lt;div class=&quot;form-group horizontal-layout phone-wrapper&quot;&gt;
    &lt;label class=&quot;form-label&quot;&gt;
        電話番号
        &lt;span class=&quot;required-text&quot;&gt;必須&lt;/span&gt;
    &lt;/label&gt;
    &lt;input type=&quot;tel&quot; 
           class=&quot;form-input&quot; 
           name=&quot;phone_horizontal&quot; 
           placeholder=&quot;09012345678&quot;
           pattern=&quot;[0-9]{10,11}&quot;
           maxlength=&quot;11&quot;
           required&gt;
&lt;/div&gt;</code></pre></div>



<div class="hcb_wrap"><pre class="prism line-numbers lang-css" data-lang="CSS"><code>/* 共通スタイル */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.required-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    background: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #c53030;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* 横並びレイアウト */
.horizontal-layout {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.horizontal-layout .form-label {
    min-width: 140px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.horizontal-layout .form-input {
    flex: 1;
}

/* 電話番号用の横幅制限 */
.phone-wrapper .form-input {
    width: 180px;
    max-width: 180px;
    flex-shrink: 0;
}</code></pre></div>
</div></details>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">まとめ</h2>



<p class="wp-block-paragraph">この記事では、Webサイトのフォーム作成で頻出する様々なレイアウトパターンを紹介しました。</p>


<div class="swell-block-balloon"><div class="c-balloon -bln-left" data-col="gray"><div class="c-balloon__icon -circle"><img decoding="async" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/キリッ-150x150.jpg" alt="" class="lazyload c-balloon__iconImg" width="80px" height="80px"><noscript><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2023/07/キリッ-150x150.jpg" alt="" class="c-balloon__iconImg" width="80px" height="80px"></noscript><span class="c-balloon__iconName">ケケンタ</span></div><div class="c-balloon__body -speaking -border-on"><div class="c-balloon__text">
<p>電話番号や都道府県などの固有のフォームのサンプルコードも掲載していますので、ぜひご活用いただけるとうれしいです！</p>
<span class="c-balloon__shapes"><span class="c-balloon__before"></span><span class="c-balloon__after"></span></span></div></div></div></div>


<p class="is-style-balloon_box2 wp-block-paragraph"><span style="--the-icon-svg: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgd2lkdGg9IjFlbSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSIgdmlld0JveD0iMCAwIDQ4IDQ4Ij48cGF0aCBkPSJNOTcuNiAxMy45Yy0uNS0uNy0uNC0xLjYuMi0ybDMuNi0yLjVjLjYtLjQgMS41LS4yIDEuOS41LjUuNy40IDEuNi0uMiAybC0zLjYgMi41Yy0uNi40LTEuNS4yLTEuOS0uNXpNMTAwLjcgMjIuNGMtLjEtLjguNS0xLjUgMS4yLTEuNmw0LjQtLjRjLjctLjEgMS40LjYgMS40IDEuNC4xLjgtLjUgMS41LTEuMiAxLjZsLTQuNC40Yy0uNy4xLTEuNC0uNi0xLjQtMS40ek05MC42IDguMWMtLjctLjMtMS4xLTEuMi0uOC0xLjhsMS44LTRjLjMtLjYgMS4yLS45IDEuOS0uNi43LjMgMS4xIDEuMi44IDEuOGwtMS44IDRjLS4zLjctMS4yLjktMS45LjZ6TTQwLjkgMjguNyAyNC4yIDQuOWMtMS4xLTEuNi0yLjUtMS41LTMtMS40LS43LjItMiAuOC0yLjQgMy4xLTIuMSA4LTYuMSAxMi4yLTkuMiAxNC4zbC02LjQgNC41QzEuNyAyNi40LjggMjggLjcgMjkuOGMtLjEgMS41LjMgMi45IDEuMiA0LjEgMS4xIDEuNSAzIDQuMyA0IDUuOC43IDEgMS42IDEuOCAyLjcgMi4yLjguMyAxLjUuNCAyLjMuNCAxLjIgMCAyLjQtLjQgMy40LTEuMWwzLjktMi44IDQuNCA2LjJjLjYuOSAxLjkgMS4xIDIuOC41TDI3IDQ0Yy45LS42IDEuMS0xLjkuNS0yLjhsLTQuMi02YzMuMi0xLjYgNy44LTIuOCAxNC0yLjIgMi40LjQgMy40LS42IDMuOC0xLjIuMy0uMy45LTEuNS0uMi0zLjF6TTIxIDMyLjFsLTYuOC05LjdjMi45LTIuNyA2LjEtNi44IDgtMTMuM2w3IDEwIDcgMTBjLTYuNy0uNC0xMS43IDEuMS0xNS4yIDN6TTQyLjcgMTIuMiAzOC42IDE1Yy0uNy41LTEuNi4zLTIuMS0uNHMtLjMtMS42LjQtMi4xTDQxIDkuN2MuNy0uNSAxLjYtLjMgMi4xLjQuNS42LjMgMS42LS40IDIuMXpNMzMuOSAzLjdsLTIuMSA0LjVjLS40LjgtMS4yIDEuMS0yIC43LS44LS40LTEuMS0xLjItLjctMmwyLjEtNC41Yy40LS44IDEuMi0xLjEgMi0uNy44LjQgMS4xIDEuMy43IDJ6TTQ2LjIgMjMuOGwtNSAuNGMtLjguMS0xLjYtLjUtMS42LTEuNC0uMS0uOC41LTEuNiAxLjQtMS42bDUtLjRjLjgtLjEgMS42LjUgMS42IDEuNCAwIC44LS42IDEuNi0xLjQgMS42eiI+PC9wYXRoPjwvc3ZnPg==)" data-icon="LsMegaphone" data-id="0" aria-hidden="true" class="swl-inline-icon"> </span> おすすめの記事</p>


<div class="swell-block-postLink">			<div class="p-blogCard -internal" data-type="type2" data-onclick="clickLink">
				<div class="p-blogCard__inner">
					<span class="p-blogCard__caption">あわせて読みたい</span>
					<div class="p-blogCard__thumb c-postThumb"><figure class="c-postThumb__figure"><img decoding="async" src="https://kekenta-it-blog.com/wp-content/uploads/2025/08/eye-catch__form-input-animations-complete-guide__16498-300x169.jpg" alt="" class="c-postThumb__img u-obf-cover" width="320" height="180"></figure></div>					<div class="p-blogCard__body">
						<a class="p-blogCard__title" href="https://kekenta-it-blog.com/form-input-animations-complete-guide/">【Web制作】フォーム・入力アニメーション完全ガイド｜4カテゴリ・22種類を網羅</a>
						<span class="p-blogCard__excerpt">Webサイトのフォームを魅力的で使いやすくするフォーム・入力アニメーションを4カテゴリ・22種類完全網羅！ 各カテゴリから厳選した代表的なアニメーションをCodePenデ&#8230;</span>					</div>
				</div>
			</div>
		</div>]]></content:encoded>
					
					<wfw:commentRss>https://kekenta-it-blog.com/form-patterns-complete-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
