GitHub

Components

Input

import { Input } from "@eggspot/ui"

Intents

<Input intent={Input.intents.base} placeholder="Type anything" />
<Input intent={Input.intents.primary} placeholder="Type anything" />
<Input intent={Input.intents.success} placeholder="Type anything" />
<Input intent={Input.intents.warning} placeholder="Type anything" />
<Input intent={Input.intents.danger} placeholder="Type anything" />

Size

<Input intent={Input.intents.danger} placeholder="Type anything" />
<Input intent={Input.intents.warning} placeholder="Type anything" />
<Input
  intent={Input.intents.primary}
  large
  placeholder="Type anything"
/>
<Input
  intent={Input.intents.success}
  large
  placeholder="Type anything"
/>

Icon

<Input
  intent={Input.intents.primary}
  placeholder="Type anything"
  leftIcon={SvgAppsIcon}
/>
<Input
  intent={Input.intents.success}
  placeholder="Type anything"
  leftIcon={SvgAppsIcon}
  rightIcon={SvgArrowRightIcon}
/>

Props

AttributeTypeDescriptionDefault
intentIntentsChange input colorbase
largebooleanChange checkbox sizefalse
leftElementReact.ReactNodeLeft elements appear within the Input-
rightElementReact.ReactNodeRight elements appear within the Input-
leftIconReact.FC<SvgIconProps>Leftmost Icon of the Input-
rightIconReact.FC<SvgIconProps>Rightmost Icon of the Input-
clsstringClass of input-
containerClsstringClass of container input-
...id, disabled, ...htmlProps-

Types

Intents type

type Intents = 'base' | 'primary' | 'success' | 'warning' | 'danger';
Previous
Dialog