Skip to content

Commit d4f9ce3

Browse files
committed
translate(reference): react-dom option component
Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
1 parent 6242c65 commit d4f9ce3

1 file changed

Lines changed: 19 additions & 13 deletions

File tree

  • src/content/reference/react-dom/components

src/content/reference/react-dom/components/option.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
---
22
title: "<option>"
3+
translationStatus: ai-draft
34
---
45

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+
512
<Intro>
613

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).
815

916
```js
1017
<select>
@@ -23,7 +30,7 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
2330

2431
### `<option>` {/*option*/}
2532

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).
2734

2835
```js
2936
<select>
@@ -32,31 +39,31 @@ The [built-in browser `<option>` component](https://developer.mozilla.org/en-US/
3239
</select>
3340
```
3441

35-
[See more examples below.](#usage)
42+
[Vedi altri esempi sotto.](#usage)
3643

3744
#### Props {/*props*/}
3845

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)
4047

41-
Additionally, `<option>` supports these props:
48+
Inoltre, `<option>` supporta queste props:
4249

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.
4653

4754
#### Caveats {/*caveats*/}
4855

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.
5057

5158
---
5259

5360
## Usage {/*usage*/}
5461

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*/}
5663

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.
5865

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)
6067

6168
<Sandpack>
6269

@@ -80,4 +87,3 @@ select { margin: 5px; }
8087
```
8188

8289
</Sandpack>
83-

0 commit comments

Comments
 (0)