G
Tokens
TypographySpacingColorRadiusShadowMotion
Patterns
CardsModals

GhostInput

Value


    () => {
      const [value, setValue] = useState('200')
      return (
        <GhostInput 
          value={value}
          onChange={e => setValue(e.target.value)}
        />
      )
    }
  

Placeholder


    () => {
      const [value, setValue] = useState('')
      return (
        <GhostInput 
          value={value}
          onChange={e => setValue(e.target.value)}
          placeholder="000"
          type="number"
        />
      )
    }
  

Prefix


    () => {
      const [value1, setValue1] = useState('39A36C')
      const [value2, setValue2] = useState('39A36C')
      return (
        <Stack gap="s">
          <GhostInput 
            value={value1}
            onChange={e => setValue1(e.target.value)}
            prefix="#"
          />
          <GhostInput 
            value={value2}
            onChange={e => setValue2(e.target.value)}
            prefix="HEX"
          />
        </Stack>
      )
    }
  

Ellipsis


    () => {
      const [value, setValue] = useState(demoText.l)
      return (
        <GhostInput 
          value={value}
          onChange={e => setValue(e.target.value)}
          hasEllipsis
        />
      )
    }
  

Props

Name
Type
Default
type
oneOf
'text' 'number'
'text'
isTabular
bool
true
value
oneOfType
string
number
placeholder
string
id
string
prefix
string
hasEllipsis
bool