Skip to content
Vy logo
  • Spor
  • Resources
Components

Input

Input fields are used to let the users type in content.

FigmaGitHub

Code examples

<Input label="Name" />

Guidelines

Input is wrapped in a Field component, making it easy to define label, errorText and helperText in the best accessible way.

Props from the component comes from a large selection. Unique for Input is listed under code.

For search, use SearchInput.

For password, use PasswordInput.

For phone, use PhoneNumberInput.

Code

<Input />

import { Input } from "@vygruppen/spor-react";

Props

Name
Type
Required?
Description
labelstringA descriptive label
variant"core" | "floating"Defaults to core.
startElementReact.ReactNodeUse the 24px icons
endElementReact.ReactNodeUse the 24px icons
disabledboolean
invalidboolean
errorTextReact.ReactNodeDisplay error text for the component
readonlyboolean
requiredboolean
helperTextReact.ReactNodeDisplay helper text for the input