⊗jsvuPmStIO 40 of 72 menu

Inline object with CSS classes in Vue

An object with CSS classes can be written directly as the value of the class attribute:

<template> <p :class="{active: true, error: false}"> text </p> </template>

Classes whose names contain a hyphen must be enclosed in quotation marks:

<template> <p :class="{active: true, 'has-error': false}"> text </p> </template>

Given the following object with CSS classes:

{active: true, valid: false}

Apply this object to some tag.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline