Accepted values for sizing elements.

Essentially, all the well-known HTML properties are available, but with predefined values.

We discourage developers from using these tags. If possible, use flexbox for layout design. However, you are not prohibited from using them.

See below for an example using some of the properties:

Example:

<View
width={200}
height={100}
>
<Text color="neutral-900">My awesome text</Text>
</View>

Hierarchy

Properties

bottom?: string | number

A distance from the bottom.

Example:

  <bottom={20} />
display?: "none" | "block" | "flex" | "inline" | "inline-block" | "inline-flex"

Changes the element exhibition

Example:

<display="flex"/>
height?: string | number

Adjust component height

Example:

   <height={100} />
id?: string

"Fills the ID of the element (not very practical)."

Example:

 <View id="id" />
left?: string | number

A distance from the left.

Example:

  <left={20} />
max?: number

The limit of the quantity. Example:

<QuantityInput max={10}/>
maxHeight?: string | number

Adjust component maximum height

Example:

   <maxHeight={100} />
maxWidth?: string | number

Adjust component maximum width

Example:

   <maxwidth={100} />
minHeight?: string | number

Adjust component minimum height

Example:

   <minHeight={100} />
minWidth?: string | number

Adjust component minimum width

Example:

   <minWidth={100} />
onChange: ((e) => void)

Type declaration

    • (e): void
    • Function called when the quantity is changed. Example:

      <QuantityInput onChange={this.myFunction}/>
      

      Parameters

      • e: any

        the quantity.

      Returns void

opacity?: "none" | "solid" | "light" | "half" | "heavy" | "transparent"

Changes the element opacity

Example:

<opacity="light" />
position?: "fixed" | "static" | "relative" | "absolute" | "sticky"

The element positioning.

Example:

  <position="relative" />
right?: string | number

A distance from the right.

Example:

  <right={20} />
top?: string | number

A distance from the top.

Example:

  <top={20} />
transform?: string

"Prepare a position transforming of element"

Example:

 <View transform="rotate(45deg)" />
transition?: string

"Prepare a transition of visual state change"

Example:

 <View transition="background-color 0.5s ease-in-out" />
value?: number

The quantity that is initiated If the value is greater than the maximum, it will become 1 Example:

<QuantityInput value={2}/>
visibility?: "hidden" | "visible" | "collapse"

Changes the element visibility

Example:

<visibility="visible" />
visualState?: "success" | "danger" | "warning"

"Determines the visual state of the component and its children."

Example:

 <View visualState="success" />
width?: string | number

Adjust component width

Example:

   <width={100} />
zIndex?: number | "auto" | "inherit" | "initial" | "unset" | "revert" | "revert-layer"

Value of z-index

Example:

  <zIndex={1} />