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
"Opacity"
Opacity
Class Opacity
Provides a way to create a set of divisions that have nice aliases to access them:
example
A basic set of divisions
```ts const opacity = new Opacity({ base: 0.6 }); opacity.transparent; opacity.translucent; opacity.semi; // -> 0.6; opacity.cloudy; opacity.opaque; ```
example
Customise scaling, reduces the range of the divisions
```ts const opacity = new Opacity({ base: 0.5, scale: (0.15 as Scale) }); ```
example
Customise certain stops (or all of them `100` to `900`)
```ts const opacity = new Opacity({ base: { 500: 0.6, 600: 0.65, 700: 0.8 }}); ```
Hierarchy
Divisions
<
number
>
Opacity
Implements
IDivisions
<
number
>
IOpacity
Index
Constructors
constructor
Accessors
100
200
300
400
500
600
700
800
900
cloudy
opaque
semi
translucent
transparent
Methods
__@to
Primitive
Constructors
constructor
new
Opacity
(
__namedParameters
?:
object
)
:
Opacity
Parameters
Default value
__namedParameters:
object
= {}
callback
:
undefined
|
ratio
override
:
undefined
|
number
|
IDivisionsOverrides
<
number
>
scale
:
undefined
|
number
Returns
Opacity
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
cloudy
get
cloudy
(
)
:
number
Returns
number
opaque
get
opaque
(
)
:
number
Returns
number
semi
get
semi
(
)
:
number
Returns
number
translucent
get
translucent
(
)
:
number
Returns
number
transparent
get
transparent
(
)
:
number
Returns
number
Methods
__@to
Primitive
__@to
Primitive
(
hint
:
"string"
|
"number"
|
"default"
)
:
number
|
string
Parameters
hint:
"string"
|
"number"
|
"default"
Returns
number
|
string
Globals
"
Opacity"
Opacity
constructor
100
200
300
400
500
600
700
800
900
cloudy
opaque
semi
translucent
transparent
__@to
Primitive
IOpacity
Options
opacity
Base
opacity
Ratio
Provides a way to create a set of divisions that have nice aliases to access them: