Search
Preparing search index...
The search index is not available
EF React Native Style Framework
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"Length"
Length
Class Length
Provides a way to create a set of divisions that have nice aliases to access them:
example
A basic set of divisions
```ts const length = new Length({ base: 10 }); length.tiny; length.smallest; length.smaller; length.small; length.normal; // -> 10 length.large; length.larger; length.largest; length.huge; ```
example
Customise scaling, reduces the range of the divisions
```ts const length = new Length({ base: 16, scale: Scale.PerfectFifth }); ```
example
Customise certain stops (or all of them `100` to `900`)
```ts const length = new Length({ base: { 500: 16, 600: 24, 700: 48 }}); ```
Hierarchy
Divisions
<
number
>
Length
FontSize
BorderRadius
BorderWidth
Spacing
Implements
IDivisions
<
number
>
ILength
Index
Constructors
constructor
Accessors
100
200
300
400
500
600
700
800
900
huge
large
larger
largest
normal
small
smaller
smallest
tiny
Methods
__@to
Primitive
Constructors
constructor
new
Length
(
__namedParameters
:
object
)
:
Length
Parameters
__namedParameters:
object
base
:
number
|
IDivisionsOverrides
<
number
>
override
:
undefined
|
ratio
scale
:
undefined
|
MinorSecond
|
MajorSecond
|
MinorThird
|
MajorThird
|
PerfectFourth
|
AugmentedFourth
|
PerfectFifth
|
GoldenRatio
Returns
Length
Accessors
100
get
100
(
)
:
number
Returns
number
200
get
200
(
)
:
number
Returns
number
300
get
300
(
)
:
number
Returns
number
400
get
400
(
)
:
number
Returns
number
500
get
500
(
)
:
number
Returns
number
600
get
600
(
)
:
number
Returns
number
700
get
700
(
)
:
number
Returns
number
800
get
800
(
)
:
number
Returns
number
900
get
900
(
)
:
number
Returns
number
huge
get
huge
(
)
:
number
Returns
number
large
get
large
(
)
:
number
Returns
number
larger
get
larger
(
)
:
number
Returns
number
largest
get
largest
(
)
:
number
Returns
number
normal
get
normal
(
)
:
number
Returns
number
small
get
small
(
)
:
number
Returns
number
smaller
get
smaller
(
)
:
number
Returns
number
smallest
get
smallest
(
)
:
number
Returns
number
tiny
get
tiny
(
)
:
number
Returns
number
Methods
__@to
Primitive
__@to
Primitive
(
hint
:
"string"
|
"number"
|
"default"
)
:
number
|
string
Parameters
hint:
"string"
|
"number"
|
"default"
Returns
number
|
string
Globals
"
Length"
Length
constructor
100
200
300
400
500
600
700
800
900
huge
large
larger
largest
normal
small
smaller
smallest
tiny
__@to
Primitive
ILength
Divisions
ILength
Options
length
Ratio
Provides a way to create a set of divisions that have nice aliases to access them: