title | current_page |
---|---|
Forms in React |
react |
import {Box, Heading} from '@primer/react' import FormsLayout from '~/src/layouts/forms-layout' export default FormsLayout
<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
An autocomplete input renders a text input that allows a user to quickly filter through a list of options to pick one or more values.
Interface guidelines | Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A set of checkboxes to let users make one or more selections from a short list of options
Interface guidelines | Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A form control renders a labelled input and, optionally, associated validation text and/or hint text.
Interface guidelines | Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A set of radio inputs to let users make a single selection from a short list of options
Interface guidelines | Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A select input may be used when a user needs to select one option from a long list
Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A text area is used to put multiple lines of text in an input
Primer React implementation<Box mb={4} display="flex" alignItems="flex-start" flexDirection={['column', 'column', 'column', 'column', 'row']} sx={{gap: 3}}
A text input is used to set a value that is a single line of text. See the list of{' '} types in the MDN docs.
Interface guidelines | Primer React implementation