npm install yukit
Add styles in angular.json
{
"styles": [
"node_modules/yukit/src/lib/yukit.scss"
]
}
Import YukitModule
in component module
import {YukitModule} from 'yukit';
@NgModule({
imports: [YukitModule],
declarations: [AppComponent]
})
export class AppModule {
}
Attribute |
Type |
Default |
picture |
string |undefined
|
undefined |
Attribute |
Type |
Default |
type |
dot |digit
|
digit |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
Attribute |
Type |
Default |
type |
clear |outline |solid |default |undefined
|
undefined |
expand |
block |full |undefined
|
undefined |
size |
small |medium |large
|
medium |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
disabled |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the button loses focus. |
yuFocus |
Emitted when the button has focus. |
yuClick |
Emitted when the button has been clicked. |
<yu-checkbox></yu-checkbox>
Attribute |
Type |
Default |
justify |
end |space-between |start
|
space-between |
labelPlacement |
end |fixed |stacked |start
|
start |
alignment |
start |center
|
center |
indeterminate |
boolean |
false |
disabled |
boolean |
false |
helperText |
string |undefined
|
undefined |
isIncorrectValue |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the checkbox loses focus. |
yuFocus |
Emitted when the checkbox has focus. |
Attribute |
Type |
Default |
startIcon |
string |undefined
|
undefined |
endIcon |
string |undefined
|
undefined |
badge |
primary |success |error |warning |info |medium |gradient |light |dark |undefined
|
undefined |
Attribute |
Type |
Default |
icon |
string |undefined
|
undefined |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
List of all icons: https://phosphoricons.com/
Attribute |
Type |
Default |
name |
string |
|
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
gradient |
Name |
Description |
--yu-icon-size |
Font size of the icon |
--yu-icon-weight |
Font weight of the icon |
Attribute |
Type |
Default |
label |
string |
|
placeholder |
string |
|
type |
date |datetime-local |email |month |number |password |search |tel |text |time |url |week
|
text |
inputmode |
decimal |email |none |numeric |search |tel |text |url |password |undefined
|
undefined |
autocapitalize |
string |
off |
passwordToggle |
boolean |
false |
disabled |
boolean |
false |
helperText |
string |undefined
|
undefined |
isIncorrectValue |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the input loses focus. |
yuFocus |
Emitted when the input has focus. |
<yu-list-action></yu-list-action>
Attribute |
Type |
Default |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
Attribute |
Type |
Default |
name |
string |
|
message |
string |
|
icon |
string |
"warning-circle" |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
<yu-searchbar></yu-searchbar>
Attribute |
Type |
Default |
placeholder |
string |
"Buscar" |
setFocus |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the input loses focus. |
yuFocus |
Emitted when the input has focus. |
yuClear |
Emitted when the clear input button is clicked. |
yuCancel |
Emitted when the cancel button is clicked. |
Attribute |
Type |
Default |
icon |
string |undefined
|
undefined |
type |
contained |outlined
|
contained |
color |
primary |success |error |warning |info |medium |gradient |light |dark
|
primary |
disabled |
boolean |
false |
<yu-textarea></yu-textarea>
Attribute |
Type |
Default |
label |
string |
|
placeholder |
string |
|
type |
date |datetime-local |email |month |number |password |search |tel |text |time |url |week
|
text |
inputmode |
decimal |email |none |numeric |search |tel |text |url |password |undefined
|
undefined |
autocapitalize |
string |
off |
rows |
number |undefined
|
undefined |
cols |
number |undefined
|
undefined |
autoGrow |
boolean |
false |
disabled |
boolean |
false |
helperText |
string |undefined
|
undefined |
isIncorrectValue |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the textarea loses focus. |
yuFocus |
Emitted when the textarea has focus. |
Attribute |
Type |
Default |
justify |
end |space-between |start
|
space-between |
labelPlacement |
end |fixed |stacked |start
|
start |
alignment |
start |center
|
center |
disabled |
boolean |
false |
helperText |
string |undefined
|
undefined |
isIncorrectValue |
boolean |
false |
Name |
Description |
yuBlur |
Emitted when the toggle loses focus. |
yuFocus |
Emitted when the toggle has focus. |
enterAnimation
leaveAnimation
NOTE: The animations are in an external service
-
Principal button:
-
Cancel button:
const alert = await this.alertCtrl.create({
enterAnimation: this.animationsService.showAlertAnimation,
leaveAnimation: this.animationsService.hideAlertAnimation,
header: 'Alert!',
buttons: [
{
text: 'Cancel',
role: 'cancel',
},
{
text: 'OK',
role: 'destructive',
}
]
});
await alert.present();
-
Principal button:
-
Cancel button:
-
text
: empty text
-
role
: cancel
const actionSheet = await this.actionSheetCtrl.create({
header: 'Options',
buttons: [
{
text: 'Share',
},
{
text: 'Delete all',
role: 'principal',
},
{
text: '',
role: 'cancel',
}
]
});
await actionSheet.present();
The icons shown are from ionic. For a list of all available icons, see https://ionic.io/ionicons.
The color to use, it must establish the class
yu-color-${color}
- Cancel button:
-
text
: empty text
-
icon
: close
-
role
: cancel
const toast = await this.toastCtrl.create({
header: 'Hello world!',
message: 'Show toast during 3 seconds',
icon: 'warning-outline',
duration: 3000,
position: 'top',
cssClass: `yu-color-warning`,
buttons: [
{
text: '',
icon: 'close',
role: 'cancel',
}
]
});
await toast.present();