BLOX-INPUT Testing

Empty Blox-Input

The input displays with a border by default. The display reacts to the values of the css variables that can be adjusted with the settings panel.

Blox Input with Type Property

Setting the type property will set the type of the input in the shadow dom. It supports a specific subset of input types.

date

On some browsers this will display an additional calendar icon which gets a light background.

datetime-local

On some browsers this will display an additional calendar icon which gets a light background.

email

number

password

The password type will cause a 'show' / 'hide' password toggle widget to display

search

The style of the search box is being affected by the main style.css file

  [type=search] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
  }

tel

text

time

On some browsers this will display an additional clock icon which gets a light background.

url

invalid type passed

(defaults to text)

Name, Value and Placeholder properties

Blox Input with Name Property

Inspecting the element will how the input in the shadow dom has the 'name' property set.

Blox Input with Value Property

The value of the blox-input displays and propagates to the input in the shadow dom.

Blox Input Placeholder

Similarly, the placeholder will propagate to the input in the shadow dom.

Clearable, and Reset to default value

Blox Input with Clear Functionality

The clearable property makes a 'clear' button display

Blox Input with defaultValue Property

When the default-value property is set, a reset button will display.

Immutable inputs

Blox Input readonly

Read-only inputs look like other inputs and can be focused.

The value cannot be changed either with js or user input.

Blox Input disabled

Disabled inputs appear different than other elements and cannot be focused.

The value cannot be changed either with js or user input.

Blox Inputs with all Size Property Values

The border radius of the different sized inputs reacts to the css variables.

Label and Label Position properties

The label is on top by default

The position of the label can be customized using the available parts

The size of the label reacts to the size property.

Blox Input filled

Displays as the opposite color theme.

Blox Input Validation

Blox Input with a Pattern Match

Blox Input with number type and minimum set

Blox Input with number type and maximum set

Blox Input with string type and Minimum Length set

Blox Input with string type and Maximum Length set

Blox Input with both Min and Max Length set

Blox Input with Validation Text

Blox Input with Help Text

Blox Input with Help Text and Validation Text

Blox Input Required

Validate

Blox Input slot demo

Slotted elements will display green

prefix postfix prefixpostfix

Blox Input with all slots

prefixpostfix

Style Override demo

Corners can be customized per-element by defining the variable to a specific scope.

Always square

prefixpostfix

Always round

prefixpostfix

Always pill

prefixpostfix

Parts Demo

Base prefixpostfix