
Ionic – Segment, Sliding Tabs Examples
Table of Contents
Sources
Starter-Code
// seg-buttons.page.html
seg-buttons
SIGN-IN
SIGN-UP
Sign-In
Sign-In
Login here
1
2
3
4
STEP {{segmentSubModel}}
Sign-Up
1
2
3
4
// seg-buttons.page.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-seg-buttons',
templateUrl: './seg-buttons.page.html',
styleUrls: ['./seg-buttons.page.scss'],
})
export class SegButtonsPage implements OnInit {
segmentModel = "signin";
segmentSubModel = "1";
constructor() { }
ngOnInit() {
}
segmentChanged(event){
console.log(this.segmentModel);
console.log(event);
}
segmentSubChanged(event){
console.log(this.segmentSubModel);
console.log(event);
}
}
Name | Description |
---|---|
--background | Background of the segment button |
--background-checked | Background of the checked segment button |
--background-hover | Background of the segment button on hover |
--background-hover-opacity | Opacity of the segment button background on hover |
--border-color | Color of the segment button border |
--border-radius | Radius of the segment button border |
--border-style | Style of the segment button border |
--border-width | Width of the segment button border |
--background-focused | Background of the segment button when focused with the tab key |
--background-focused-opacity | Opacity of the segment button background when focused with the tab key |
--color | Color of the segment button |
--color-checked | Color of the checked segment button |
--color-focused | Color of the segment button when focused with the tab key |
--color-hover | Color of the segment button on hover |
--indicator-box-shadow | Box shadow on the indicator for the checked segment button |
--indicator-color | Color of the indicator for the checked segment button |
--indicator-height | Height of the indicator for the checked segment button |
--indicator-transform | Transform of the indicator for the checked segment button |
--indicator-transition | Transition of the indicator for the checked segment button |
--margin-bottom | Bottom margin of the segment button |
--padding-bottom | Bottom padding of the segment button |
--padding-end | Right padding if direction is left-to-right, and left padding if direction is right-to-left of the segment button |
--padding-start | Left padding if direction is left-to-right, and right padding if direction is right-to-left of the segment button |
--padding-top | Top padding of the segment button |
--transition | Transition of the segment button |
--margin-end | Right margin if direction is left-to-right, and left margin if direction is right-to-left of the segment button |
--margin-start | Left margin if direction is left-to-right, and right margin if direction is right-to-left of the segment button |
--margin-top | Top margin of the segment button |