RTLRTL is enabled by adding "ui-rtl" style class along with dir="rtl" to an ancestor element of PrimeNG components.

RTL - 图1

Source

View on GitHub

  1. <div class="ui-rtl" dir="rtl">
  2. <h3 class="first">Input</h3>
  3. <input id="in" type="text" size="30" pInputText>
  4. <h3>Dialog</h3>
  5. <p-dialog header="Godfather I" [(visible)]="visible" modal="modal" [style]="{width: '350px'}" [responsive]="true">
  6. <span>The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
  7. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
  8. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family,
  9. kind and benevolent to those who give respect,
  10. but given to ruthless violence whenever anything stands against the good of the family.</span>
  11. <p-footer>
  12. <div class="ui-dialog-buttonpane ui-helper-clearfix">
  13. <button type="button" pButton icon="pi pi-times" (click)="visible=false" label="No"></button>
  14. <button type="button" pButton icon="pi pi-check" (click)="visible=false" label="Yes"></button>
  15. </div>
  16. </p-footer>
  17. </p-dialog>
  18. <button type="text" (click)="showDialog()" pButton icon="pi pi-plus" label="Show"></button>
  19. <h3>Accordion</h3>
  20. <p-accordion>
  21. <p-accordionTab header="Godfather I" [selected]="true">
  22. The story begins as Don Vito Corleone, the head of a New York Mafia family, overseeshis daughter's wedding. His beloved son ichael has just come home from the war, but does not intend to become part of his father's business. T hrough Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.
  23. </p-accordionTab>
  24. <p-accordionTab header="Godfather II">
  25. Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream. In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy, killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows.
  26. </p-accordionTab>
  27. <p-accordionTab header="Godfather III">
  28. After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family. Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate.
  29. </p-accordionTab>
  30. </p-accordion>
  31. <h3>TabView</h3>
  32. <p-tabView>
  33. <p-tabPanel header="Godfather I">
  34. The story begins as Don Vito Corleone, the head of a New York Mafia family, overseeshis daughter's wedding. His beloved son ichael has just come home from the war, but does not intend to become part of his father's business. T hrough Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.
  35. </p-tabPanel>
  36. <p-tabPanel header="Godfather II">
  37. Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream. In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy, killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows.
  38. </p-tabPanel>
  39. <p-tabPanel header="Godfather III">
  40. After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family. Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate.
  41. </p-tabPanel>
  42. </p-tabView>
  43. </div>
  44.  
  1. export class RTLDemo {
  2. visible: boolean;
  3. }
  4.