Files
twenty/packages/twenty-docs/l/pt/twenty-ui/input/toggle.mdx
T
github-actions[bot] 8cadd00d34 i18n - translations (#15799)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-11-13 16:34:00 +01:00

40 lines
1.7 KiB
Plaintext

---
title: Alternar
image: /images/user-guide/table-views/table.png
---
<Frame>
<img src="/images/user-guide/table-views/table.png" alt="Header" />
</Frame>
<Tabs>
<Tab title="Usage">
```jsx
import { Toggle } from "twenty-ui/input";
export const MyComponent = () => {
return (
<Toggle
value = {true}
onChange = {()=>console.log('On Change event')}
color="green"
toggleSize = "medium"
/>
);
};
```
</Tab>
<Tab title="Props">
| Props | Tipo | Descrição | Padrão |
| --------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| valor | booleano | O estado atual do alternador | `falso` |
| onChange | função | Função de retorno de chamada acionada quando o estado do alternador muda | |
| cor | Nome opcional para estilização adicional | Color of the toggle when it\ | s blue color |
| alternarTamanho | Nome opcional para estilização adicional | Tamanho do alternador, afetando tanto a altura quanto o peso. Tem duas opções: `pequeno` e `médio` | médio |
</Tab>
</Tabs>