Skip to main content

Width

Utilities for setting the width of an element

Table of classes#

Class
Properties
w-0
{ width: 0 }
w-0.25
{ width: 1 }
w-0.5
{ width: 2 }
w-1
{ width: 4 }
w-1.5
{ width: 6 }
w-2
{ width: 8 }
w-2.5
{ width: 10 }
w-3
{ width: 12 }
w-3.5
{ width: 14 }
w-4
{ width: 16 }
w-5
{ width: 20 }
w-6
{ width: 24 }
w-7
{ width: 28 }
w-8
{ width: 32 }
w-9
{ width: 36 }
w-10
{ width: 40 }
w-11
{ width: 44 }
w-12
{ width: 48 }
w-14
{ width: 56 }
w-16
{ width: 64 }
w-20
{ width: 80 }
w-24
{ width: 96 }
w-28
{ width: 112 }
w-32
{ width: 128 }
w-36
{ width: 144 }
w-40
{ width: 160 }
w-44
{ width: 172 }
w-48
{ width: 196 }
w-52
{ width: 208 }
w-56
{ width: 224 }
w-60
{ width: 240 }
w-64
{ width: 256 }
w-72
{ width: 288 }
w-80
{ width: 320 }
w-1/2
{ width: '50%' }
w-1/3
{ width: '33.333333%' }
w-2/3
{ width: '66.666667%' }
w-1/4
{ width: '25%' }
w-2/4
{ width: '50%' }
w-3/4
{ width: '75%' }
w-1/5
{ width: '20%' }
w-2/5
{ width: '40%' }
w-3/5
{ width: '60%' }
w-4/5
{ width: '80%' }
w-1/6
{ width: '16.666667%' }
w-2/6
{ width: '33.333333%' }
w-3/6
{ width: '50%' }
w-4/6
{ width: '66,666667%' }
w-5/6
{ width: '83.333333%' }
w-1/12
{ width: '8.333333%' }
w-2/12
{ width: '16.666667%' }
w-3/12
{ width: '25%' }
w-4/12
{ width: '33.333333%' }
w-5/12
{ width: '41.666667%' }
w-6/12
{ width: '50%' }
w-7/12
{ width: '58.333333%' }
w-8/12
{ width: '66.666667%' }
w-9/12
{ width: '75%' }
w-10/12
{ width: '83.333333%' }
w-11/12
{ width: '91.666667%' }
w-full
{ width: '100%' }

Customization#

info

To get an introduction on how customization works, it is recommended to visit the dedicated page in the documentation

To customize the classes regarding the width, you go to modify the fields under the property called sizing.

wind.config.js
import { customize } from "react-native-wind";
customize({  theme: {    sizing: {      container: 140,    },  },});

The library will automatically generate classes for height, width, max-height, min-height, max-width and min-width called in this way:

  • w-container
  • h-container
  • min-w-container
  • max-w-container
  • min-h-container
  • max-h-container

Those will have a value of 140

note

Adding a property to sizing will always add a class to height, width, max-height, min-height, max-width and min-width because they refer to the same general values