Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

46 lignes
1.2 KiB

  1. ---
  2. name: Select
  3. route: /components/select
  4. menu: Components
  5. ---
  6. import { Playground, Props, Link } from 'docz'
  7. import Select from './Select'
  8. # Select
  9. Component for selecting values from a larger number of options.
  10. <Playground>
  11. <Select>
  12. <optgroup
  13. label="Fruits"
  14. >
  15. <option value="mango">Mango</option>
  16. <option value="strawberry">Strawberry</option>
  17. <option value="blueberry">Blueberry</option>
  18. </optgroup>
  19. <optgroup
  20. label="Classic"
  21. >
  22. <option value="chocolate">Chocolate</option>
  23. <option value="vanilla">Vanilla</option>
  24. </optgroup>
  25. </Select>
  26. </Playground>
  27. ## Props
  28. <Props of={Select} />
  29. ## Usage Notes
  30. The component will behave as `block`, i.e. it takes the remaining of the horizontal space.
  31. To use the component together with layouts, see [TextInput](./textinput) for examples. Both `Select` and
  32. `TextInput` have similar strategies on usage with layouts.
  33. ## See Also
  34. - <Link to="../checkbox">Checkbox</Link> for a similar component on selecting values among very few choices.
  35. - <Link to="../radiobutton">RadioButton</Link> for a similar component on selecting a single value among very few choices.