You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react-dom/components/option.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,17 @@
1
1
---
2
2
title: "<option>"
3
+
translationStatus: ai-draft
3
4
---
4
5
6
+
<Note>
7
+
8
+
Questa pagina è stata tradotta automaticamente e supervisionata da un maintainer. Un'ulteriore revisione da parte della community sarebbe comunque utile. [Migliora questa traduzione](https://github.com/reactjs/it.react.dev/edit/main/src/content/reference/react-dom/components/option.md).
9
+
10
+
</Note>
11
+
5
12
<Intro>
6
13
7
-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
14
+
Il [componente browser integrato `<option>`](https://developer.mozilla.org/it/docs/Web/HTML/Element/option)ti permette di renderizzare un'opzione dentro una casella [`<select>`](/reference/react-dom/components/select).
8
15
9
16
```js
10
17
<select>
@@ -23,7 +30,7 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
23
30
24
31
### `<option>` {/*option*/}
25
32
26
-
The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)lets you render an option inside a [`<select>`](/reference/react-dom/components/select) box.
33
+
Il [componente browser integrato `<option>`](https://developer.mozilla.org/it/docs/Web/HTML/Element/option)ti permette di renderizzare un'opzione dentro una casella [`<select>`](/reference/react-dom/components/select).
27
34
28
35
```js
29
36
<select>
@@ -32,31 +39,31 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
32
39
</select>
33
40
```
34
41
35
-
[See more examples below.](#usage)
42
+
[Vedi altri esempi sotto.](#usage)
36
43
37
44
#### Props {/*props*/}
38
45
39
-
`<option>`supports all [common element props.](/reference/react-dom/components/common#common-props)
46
+
`<option>`supporta tutte le [props comuni degli elementi.](/reference/react-dom/components/common#common-props)
40
47
41
-
Additionally, `<option>`supports these props:
48
+
Inoltre, `<option>`supporta queste props:
42
49
43
-
*[`disabled`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#disabled): A boolean. If`true`, the option will not be selectable and will appear dimmed.
44
-
*[`label`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#label): A string. Specifies the meaning of the option. If not specified, the text inside the option is used.
45
-
*[`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#value): The value to be used [when submitting the parent`<select>` in a form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form)if this option is selected.
50
+
*[`disabled`](https://developer.mozilla.org/it/docs/Web/HTML/Element/option#disabled): Un booleano. Se`true`, l'opzione non sarà selezionabile e apparirà attenuata.
51
+
*[`label`](https://developer.mozilla.org/it/docs/Web/HTML/Element/option#label): Una stringa. Specifica il significato dell'opzione. Se non specificato, viene usato il testo dentro l'opzione.
52
+
*[`value`](https://developer.mozilla.org/it/docs/Web/HTML/Element/option#value): Il valore da usare [quando si invia il`<select>`padre in un form](/reference/react-dom/components/select#reading-the-select-box-value-when-submitting-a-form)se questa opzione è selezionata.
46
53
47
54
#### Caveats {/*caveats*/}
48
55
49
-
* React does not support the `selected`attribute on `<option>`. Instead, pass this option's `value`to the parent [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option)for an uncontrolled select box, or [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable)for a controlled select.
56
+
* React non supporta l'attributo `selected`su `<option>`. Passa invece il `value`di questa opzione al [`<select defaultValue>`](/reference/react-dom/components/select#providing-an-initially-selected-option)padre per un select non controllato, oppure al [`<select value>`](/reference/react-dom/components/select#controlling-a-select-box-with-a-state-variable)padre per un select controllato.
50
57
51
58
---
52
59
53
60
## Usage {/*usage*/}
54
61
55
-
### Displaying a select box with options {/*displaying-a-select-box-with-options*/}
62
+
### Visualizzare una casella di selezione con opzioni {/*displaying-a-select-box-with-options*/}
56
63
57
-
Render a`<select>`with a list of `<option>`components inside to display a select box. Give each `<option>`a`value`representing the data to be submitted with the form.
64
+
Renderizza un`<select>`con un elenco di componenti `<option>`al suo interno per visualizzare una casella select. Assegna a ogni `<option>`un`value`che rappresenta i dati da inviare con il form.
58
65
59
-
[Read more about displaying a `<select>`with a list of `<option>` components.](/reference/react-dom/components/select)
66
+
[Leggi di più sulla visualizzazione di un `<select>`con un elenco di componenti `<option>`.](/reference/react-dom/components/select)
0 commit comments