|
1 | 1 | ---
|
2 |
| -title: "React DOM Components" |
| 2 | +title: "React DOM コンポーネント" |
3 | 3 | ---
|
4 | 4 |
|
5 | 5 | <Intro>
|
6 | 6 |
|
7 |
| -React supports all of the browser built-in [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) components. |
| 7 | +React は、ブラウザ組み込みのすべての [HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) と [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Element) コンポーネントをサポートしています。 |
8 | 8 |
|
9 | 9 | </Intro>
|
10 | 10 |
|
11 | 11 | ---
|
12 | 12 |
|
13 |
| -## Common components {/*common-components*/} |
| 13 | +## 一般的なコンポーネント {/*common-components*/} |
14 | 14 |
|
15 |
| -All of the built-in browser components support some props and events. |
| 15 | +すべてのブラウザ組み込みコンポーネントは、いくつかの props とイベントをサポートしています。 |
16 | 16 |
|
17 |
| -* [Common components (e.g. `<div>`)](/reference/react-dom/components/common) |
| 17 | +* [`<div>` などの一般的なコンポーネント](/reference/react-dom/components/common) |
18 | 18 |
|
19 |
| -This includes React-specific props like `ref` and `dangerouslySetInnerHTML`. |
| 19 | +これには、`ref` や `dangerouslySetInnerHTML` のような React 固有の props も含みます。 |
20 | 20 |
|
21 | 21 | ---
|
22 | 22 |
|
23 |
| -## Form components {/*form-components*/} |
| 23 | +## フォームコンポーネント {/*form-components*/} |
24 | 24 |
|
25 |
| -These built-in browser components accept user input: |
| 25 | +以下のブラウザ内蔵コンポーネントはユーザからの入力を受け付けます。 |
26 | 26 |
|
27 | 27 | * [`<input>`](/reference/react-dom/components/input)
|
28 | 28 | * [`<select>`](/reference/react-dom/components/select)
|
29 | 29 | * [`<textarea>`](/reference/react-dom/components/textarea)
|
30 | 30 |
|
31 |
| -They are special in React because passing the `value` prop to them makes them *[controlled.](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)* |
| 31 | +これらは React では特別です。なぜなら props として `value` を渡すと[*制御されたコンポーネント*](/reference/react-dom/components/input#controlling-an-input-with-a-state-variable)になるからです。 |
32 | 32 |
|
33 | 33 | ---
|
34 | 34 |
|
35 |
| -## All HTML components {/*all-html-components*/} |
| 35 | +## すべての HTML コンポーネント {/*all-html-components*/} |
36 | 36 |
|
37 |
| -React supports all built-in browser HTML components. This includes: |
| 37 | +React はブラウザ組み込みのすべての HTML コンポーネントをサポートしています。これには以下が含まれます。 |
38 | 38 |
|
39 | 39 | * [`<aside>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside)
|
40 | 40 | * [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio)
|
@@ -140,38 +140,38 @@ React supports all built-in browser HTML components. This includes:
|
140 | 140 |
|
141 | 141 | <Note>
|
142 | 142 |
|
143 |
| -Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing HTML to JSX with an [online converter.](https://transform.tools/html-to-jsx) |
| 143 | +[DOM 標準](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model)と同様に、React では props の名前として `camelCase` 規則を使用します。例えば、`tabindex` ではなく `tabIndex` と書きます。既存の HTML を JSX に変換するための[オンラインコンバータ](https://transform.tools/html-to-jsx)を使用できます。 |
144 | 144 |
|
145 | 145 | </Note>
|
146 | 146 |
|
147 | 147 | ---
|
148 | 148 |
|
149 |
| -### Custom HTML elements {/*custom-html-elements*/} |
| 149 | +### カスタム HTML 要素 {/*custom-html-elements*/} |
150 | 150 |
|
151 |
| -If you render a tag with a dash, like `<my-element>`, React will assume you want to render a [custom HTML element.](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) In React, rendering custom elements works differently from rendering built-in browser tags: |
| 151 | +ダッシュを含むタグ、例えば `<my-element>` をレンダーする場合、React は[カスタム HTML 要素](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)をレンダーしていると想定します。React では、カスタム要素のレンダーは、組み込みのブラウザタグのレンダーとは異なる方法で行われます。 |
152 | 152 |
|
153 |
| -- All custom element props are serialized to strings and are always set using attributes. |
154 |
| -- Custom elements accept `class` rather than `className`, and `for` rather than `htmlFor`. |
| 153 | +- すべてのカスタム要素の props は文字列にシリアライズされ、常に属性を使用して設定されます。 |
| 154 | +- カスタム要素は `className` ではなく `class` を、`htmlFor` ではなく `for` を受け入れます。 |
155 | 155 |
|
156 |
| -If you render a built-in browser HTML element with an [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) attribute, it will also be treated as a custom element. |
| 156 | +組み込みのブラウザ HTML 要素を [`is`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is) 属性を用いてレンダーする場合も、カスタム要素として扱われます。 |
157 | 157 |
|
158 | 158 | <Note>
|
159 | 159 |
|
160 |
| -[A future version of React will include more comprehensive support for custom elements.](https://github.com/facebook/react/issues/11347#issuecomment-1122275286) |
| 160 | +[React の将来のバージョンでは、カスタム要素に対するより包括的なサポートが含まれます](https://github.com/facebook/react/issues/11347#issuecomment-1122275286)。 |
161 | 161 |
|
162 |
| -You can try it by upgrading React packages to the most recent experimental version: |
| 162 | +これは、最新の実験的 (experimental) バージョンに React パッケージをアップグレードすることで試すことができます。 |
163 | 163 |
|
164 | 164 | - `react@experimental`
|
165 | 165 | - `react-dom@experimental`
|
166 | 166 |
|
167 |
| -Experimental versions of React may contain bugs. Don't use them in production. |
| 167 | +React の実験的バージョンにはバグが含まれている可能性があります。本番環境では使用しないでください。 |
168 | 168 |
|
169 | 169 | </Note>
|
170 | 170 | ---
|
171 | 171 |
|
172 |
| -## All SVG components {/*all-svg-components*/} |
| 172 | +## すべての SVG コンポーネント {/*all-svg-components*/} |
173 | 173 |
|
174 |
| -React supports all built-in browser SVG components. This includes: |
| 174 | +React は、組み込みのブラウザ SVG コンポーネントをすべてサポートしています。以下が含まれます。 |
175 | 175 |
|
176 | 176 | * [`<a>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a)
|
177 | 177 | * [`<animate>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate)
|
@@ -242,20 +242,20 @@ React supports all built-in browser SVG components. This includes:
|
242 | 242 |
|
243 | 243 | <Note>
|
244 | 244 |
|
245 |
| -Similar to the [DOM standard,](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) React uses a `camelCase` convention for prop names. For example, you'll write `tabIndex` instead of `tabindex`. You can convert existing SVG to JSX with an [online converter.](https://transform.tools/) |
246 |
| - |
247 |
| -Namespaced attributes also have to be written without the colon: |
248 |
| - |
249 |
| -* `xlink:actuate` becomes `xlinkActuate`. |
250 |
| -* `xlink:arcrole` becomes `xlinkArcrole`. |
251 |
| -* `xlink:href` becomes `xlinkHref`. |
252 |
| -* `xlink:role` becomes `xlinkRole`. |
253 |
| -* `xlink:show` becomes `xlinkShow`. |
254 |
| -* `xlink:title` becomes `xlinkTitle`. |
255 |
| -* `xlink:type` becomes `xlinkType`. |
256 |
| -* `xml:base` becomes `xmlBase`. |
257 |
| -* `xml:lang` becomes `xmlLang`. |
258 |
| -* `xml:space` becomes `xmlSpace`. |
259 |
| -* `xmlns:xlink` becomes `xmlnsXlink`. |
| 245 | +[DOM 標準](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model)と同様に、React では props の名前として `camelCase` 規則を使用します。例えば、`tabindex` ではなく `tabIndex` と書きます。既存の SVG を JSX に変換するための[オンラインコンバータ](https://transform.tools/html-to-jsx)を使用できます。 |
| 246 | + |
| 247 | +名前空間付きの属性もコロンなしで書かなければなりません。 |
| 248 | + |
| 249 | +* `xlink:actuate` は `xlinkActuate` になります。 |
| 250 | +* `xlink:arcrole` は `xlinkArcrole` になります。 |
| 251 | +* `xlink:href` は `xlinkHref` になります。 |
| 252 | +* `xlink:role` は `xlinkRole` になります。 |
| 253 | +* `xlink:show` は `xlinkShow` になります。 |
| 254 | +* `xlink:title` は `xlinkTitle` になります。 |
| 255 | +* `xlink:type` は `xlinkType` になります。 |
| 256 | +* `xml:base` は `xmlBase` になります。 |
| 257 | +* `xml:lang` は `xmlLang` になります。 |
| 258 | +* `xml:space` は `xmlSpace` になります。 |
| 259 | +* `xmlns:xlink` は `xmlnsXlink` になります。 |
260 | 260 |
|
261 | 261 | </Note>
|
0 commit comments