Color Properties - 图1

Color Properties

Color Properties

All Framework7-Vue components supports same set of color properties that allow to set separate element colors and color themes:

PropTypeDefaultDescription
colorstringSingle element color. One of the default colors.
color-themestringApplies color theme to the element. It should be some parent element as this will have visual effect on all supported children elements, e.g. view, page, navbar, toolbar, list, etc. One of the default colors.
text-colorstringSets element’s text color. One of the default colors.
bg-colorstringSets element’s background color. One of the default colors.
border-themestringSets element’s borders color. One of the default colors.
ripple-colorstringSets element ripple wave color (MD-theme only). One of the default colors.
theme-darkbooleanfalseEnables dark layout theme on element. It should be some parent element as this will have visual effect on all supported children elements, e.g. view, page, navbar, toolbar, list, etc.

For example:

  1. <!-- Button color -->
  2. <f7-button color="red">Red Button</f7-button>
  3. <!-- Link color -->
  4. <f7-link color="green">Green Link</f7-link>
  5. <!-- Page color theme -->
  6. <f7-page color-theme="orange">
  7. ...
  8. </f7-page>
  9. <!-- Panel with dark theme -->
  10. <f7-panel theme-dark>
  11. ...
  12. </f7-panel>

Supported Colors

ColoriOSMD
red
#ff3b30
#f44336
green
#4cd964
#4caf50
blue
#007aff
#2196f3
pink
#e91e63
#e91e63
yellow
#ffcc00
#ffeb3b
orange
#ff9500
#ff9800
gray
#8e8e93
#9e9e9e
white
#fff
#fff
black
#000
#000