logo-icon
STW UI

Currency

Currency is an input field used for currency.

Usage

svelte
import { Currency } from 'stwui';
// OR
import Currency from 'stwui/currency'; // for tree shaking

Basic

With Label

With Leading

With Trailing

With Error

You're doing it wrong!

Disabled

Currency Props

name string nanoid()
error string | undefined
placholder string | undefined
value string | undefined
autocomplete 'on' | 'off' | undefined
autocapitalize 'off' | 'none' | 'sentences' | 'words' | 'characters' off
readonly boolean
disabled boolean false

Currency Slots

label <Currency.Label slot="label" />
leading <Currency.Leading slot="leading" />
trailing <Currency.Trailing slot="trailing" />

Currency.Label Slots

default

Currency.Leading Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Currency.Trailing Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Currency Class Identifiers

stwui-currency-wrapper
stwui-currency-input
stwui-currency-leading-wrapper
stwui-currency-clear-wrapper
stwui-currency-trailing-wrapper
stwui-currency-error-icon
stwui-currency-error
stwui-currency-label