Ne èdi be yeatu egbegbe nyatakakadzraɖoƒe siwo wɔa dɔ nyuie, eye woƒe nukpɔkpɔ dzea ame ŋu la, Tailwind CSS ye nye wò ɖoɖo si dzi nàyi. Etrɔa asi le CSS nuŋɔŋlɔ ƒe ɖoɖo xoxoa ŋu, si na be nàte ŋu awɔ ŋgɔdonya tɔxɛwo tẽ le wò HTML me. Tailwind CSS nye CSS frameworks siwo ame geɖe lɔ̃a zazã wu dometɔ ɖeka si ƒe installs wu miliɔn 5 kwasiɖa sia kwasiɖa.
Le Tailwind CSS me la, aɖaŋu sesẽwo wɔwɔ va zua yaƒoƒo. Dɔwɔnu ƒe hatsotsowo kple aɖaŋunu siwo wɔa dɔ nyuie ƒe ƒuƒoƒo na nète ŋu wɔa ɖoɖo siwo gɔme sese sesẽ bɔbɔe, evɔ màgblẽ wò nyatakakadzraɖoƒea ƒe dɔwɔwɔ kple edzikpɔkpɔ me o.
Tailwind CSS ƒe atsyɔ̃ɖoɖo le alesi wòte ŋu wɔa dɔ vovovowoe me. Àte ŋu awɔ nusianu tso blog ƒe axa bɔbɔe aɖe dzi va ɖo e-asitsatsa ƒe mɔnu deŋgɔ dzi, eye esiawo katã nèle viɖenu ƒe hatsotso mawo ke siwo gɔme sese le bɔbɔe zãm.
Wò susuŋudɔwɔwɔ koe seɖoƒe li na wò. Vovototo vevitɔ si le Vanilla CSS zazã domee nye alesi nàte ŋu atu aɖaŋu siwo wowɔ ɖe ɖoɖo nu la kabakaba.
Mɔnu si wozãna tsã si nye custom css classes zazã kple html components abe div, div class, p class nye tiatia ɣesiaɣi gake duƒuƒu ƒe ŋgɔyiyi si va kple Tailwind CSS na wò agbenɔnɔ nɔa bɔbɔe.
Le kɔnu nu la, woŋlɔa CSS to xexeame katã ƒe atsyãwo ƒe hatsotso aɖe ɖoɖo anyi kple wo ŋudɔwɔwɔ le akpa ɖesiaɖe me. Togbɔ be esia nye mɔnu si ame geɖe lɔ̃a zazã hã la, ate ŋu ana woawɔ kɔpi gã siwo dzi kpɔkpɔ sesẽ.
Tailwind CSS tsɔ nya ɖe nukpɔsusu sia ŋu, eye wòʋlia nya be utility-first CSS naa egbɔkpɔnu si le dzadzɛ wu, si ŋu woate ŋu alé be na wu.
daisyUI nye akpawo ƒe agbalẽdzraɖoƒe si xɔ ŋkɔ wu na Tailwind CSS, si ƒo adegbe le akpa siwo wu 50 siwo wowɔ do ŋgɔ, 500+ utility classes, kple nusiwo ateŋu adzɔ si nuwuwu meli na o kloe. Eɖea wò tso tasiaɖamfɔa gbugbɔgawɔ me ɣesiaɣi si nèwɔ dɔ yeye aɖe.
Le esi teƒe be nàgblẽ wò ɣeyiɣi ɖe ɖoɖo si tea ɖeɖi ame ŋu si nye be nàŋlɔ klass ŋkɔ gbogbo aɖewo na dɔ yeye ɖesiaɖe la, Tailwind CSS na nète ŋu zãa viɖenu ƒe hatsotso siwo me kɔ nyuie, siwo gɔmesese le wo ŋu.
Klass siawo nye esiwo woateŋu azã ake eye wowɔa dɔ le ɖekawɔwɔ me kple CSS cascade, si naa gɔmeɖoanyi sesẽ wò na wò dɔwo katã.
Le eƒe gɔmedzedze la, Tailwind CSS nye CSS ƒe ɖoɖo si nye viɖenu gbãtɔ. Esia fia be enaa dɔwɔnu ƒe hatsotso siwo le bɔbɔe, siwo woate ŋu aŋlɔ, siwo nàte ŋu azã atsɔ atu aɖaŋu ɖesiaɖe, tẽ le wò HTML me. CSS faɛl siwo nuwuwu meli na o megali o, kɔpi bɔbɔe si gɔme sese le bɔbɔe koe.
Gɔmesese ƒe klass ŋkɔwo nana wò kɔda ƒe nuxexlẽ nyona ɖe edzi, si wɔnɛ be wònɔa bɔbɔe be nàse nusi klass aɖe koŋ wɔna to eƒe ŋkɔ kpɔkpɔ ko me. Esia nye nu geɖe siwo Tailwind CSS xɔ be woatsɔ ana dɔwɔlawo ƒe nuteƒekpɔkpɔ nanyo ɖe edzi la dometɔ ɖeka.
Tailwind CSS mebla wò ɖe ɖoɖo tɔxɛ aɖeke ŋu o. Enye CSS dzadzɛ ko, eyata àteŋu azãe kple ɖoɖowɔɖi ɖesiaɖe, alo gɔ̃ hã kple ɖoɖo aɖeke kura o. Ewɔa dɔ le afisiafi si CSS wɔa dɔ le.
Viɖe siwo le Tailwind CSS zazã me dometɔ aɖewoe nye dɔwɔwɔ ƒe dzidziɖedzi, CSS faɛl ƒe lolome dzi ɖeɖe kpɔtɔ, kple dɔwɔlawo ƒe nuteƒekpɔkpɔ si nyo ɖe edzi le mɔnu si wozãna tsɔ gbãa nu ta. Tsɔ kpe ɖe eŋu la, Just-In-Time (JIT) ƒe nɔnɔmea naa xɔtutu ƒe ɣeyiɣi siwo le kabakaba abe dzikedzo ene, si wɔnɛ be wò ŋgɔyiyidɔa gawɔa dɔ kabakaba wu.
Tailwind CSS nye dɔ si wowɔ le ʋuʋu ɖi, si fia be woate ŋu azãe faa keŋkeŋ. Gazazãa vaa ne èdi be yeakpɔ nu xɔasiwo abe UI ƒe akpawo kple nɔnɔmetatawo ene, siwo wonana to Tailwind UI dzi.
Tailwind CSS naa nukpɔsusu sesẽ aɖe le alesi nàɖo wò CSS ɖe ɖoɖo nu ŋu, ke hã etrɔna ɖe nɔnɔmewo ŋu ale gbegbe be wòɖea mɔ ɖe tɔtrɔwɔwɔ ŋu. Dadasɔ sia na be nàte ŋu alé fɔ ɖe nusi le vevie wu ŋu — UI dzeaniwo tutu.
Tailwind CSS xɔa egbegbe nɔnɔmewo abe Flexbox, Grid, kple nɔnɔme tɔxɛwo, si wɔe be wònye tiatia nyui aɖe na egbegbe nyatakakadzraɖoƒe dɔwɔɖoɖowo wɔwɔ.
Hafi nàdze Tailwind CSS zazã gɔme la, ele be nàse HTML kple CSS gɔme nyuie.
Tailwind CSS sɔ na web dɔ ƒomevi ɖesiaɖe, gã alo sue. Ne ɖeɖi te ŋuwò le kamedede kple CSS me eye nèle egbɔkpɔnu si wɔa dɔ nyuie wu, si sɔ na dɔwɔlawo dim la, ekema Tailwind CSS nye na wò.
Ne menye component frameworks abe React alo Vue ene ƒe alɔdzedɔwɔƒee nènye o la, mègatsi dzi o. Tailwind CSS nye framework-agnostic eye woateŋu azãe kple HTML dzadzɛ kple JavaScript.
Togbɔ be ɖoɖo bubuwo abe Bootstrap kple Foundation naa akpa siwo wowɔ do ŋgɔ hã la, Tailwind CSS naa dɔwɔnu siwo nàtsɔ atu aɖaŋu siwo wowɔ ɖe ɖoɖo nu keŋkeŋ evɔ màgblẽ wò HTML ɖi o. Ke hã, esi wotsɔ akpawo ƒe agbalẽdzraɖoƒewo abe daisyUI ene ƒo ƒui la, àte ŋu ase vivi na xexe eveawo ƒe nyuitɔ kekeake azɔ.
Tailwind CSS kple daisyUI ƒe nɔnɔme yeyetɔwo dometɔ ɖekae nye viviti ƒe nɔnɔme, si wɔnɛ be nàte ŋu awɔ nyatakakadzraɖoƒe siwo ƒe tanya do viviti agbagbadzedze aɖeke manɔmee.
Tailwind CSS wɔa ɖeka nyuie kple egbegbe CSS ƒe nɔnɔmewo abe Flexbox ene. Le kpɔɖeŋu me, àte ŋu awɔ ɖoɖo si awɔ dɔ nyuie to klasswo abe flex, justify- center, items-center, kple bubuawo zazã me.
Ne ètsɔ Just-in-Time ƒo ƒui la, àte ŋu ate utility class ƒe asixɔxɔ vovovowo kpɔ bɔbɔe. Ne utility class ɖeka mewɔ dɔ o la, ɖeko nàtrɔe be wòatrɔ asi le wò element ŋu.
Ne èzã Tailwind CSS la, ele bɔbɔe be nàwɔ ɖoɖo sesẽwo abe mɔfianu si wɔa dɔ ene. Kpɔɖeŋu aɖee nye esi:
<nav class="flex items-center justify-between flex-wrap bg-teal-500 p-6">
<div class="flex items-center flex-shrink-0 text-white mr-6">
<span class="font-semibold text-xl tracking-tight">Tailwind CSS</span>
</div>
<div class="block lg:hidden">
<button class="flex items-center px-3 py-2 border rounded text-teal-200 border-teal-400 hover:text-white hover:border-white">
<svg class="fill-current h-3 w-3" viewBox="0 0 20 20"><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v15z"></path></svg>
</button>
</div>
<div class="w-full block flex-grow lg:flex lg:items-center lg:w-auto">
<div class="text-sm lg:flex-grow">
<a href="#responsive-header" class="block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4">Home</a>
<a href="#responsive-header" class="block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4">About</a>
<a href="#responsive-header" class="block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white">Contact</a>
</div>
</div>
</nav>
Ne ètso nya me be yeazã tailwind css code le wò dɔa me la, àte ŋu akpɔ premade components geɖe le internet dzi. Àte ŋu awɔ esiawo dometɔ ɖesiaɖe ƒe kɔpi eye nàtrɔ asi le eŋu na wò ŋutɔ wò nyatakakadzraɖoƒea.
Be woateŋu atrɔ CSS ɖe Tailwind CSS ƒe klasswo me nye nusi dɔwɔla akpa gãtɔ hiã. Nyatakakadzraɖoƒe geɖewo le internet dzi siwo wotu hafi Tailwind CSS va li. Nyatakakadzraɖoƒe siawo zãa css kple stylesheet eye nyatakakadzraɖoƒe ƒe ŋgɔyiyidɔwɔlawo di be yewoaɖe axa siawo ayi Tailwind CSS me.
DivMagic nye nyatakakadzraɖoƒe ƒe dɔwɔnu si wotu na nyatakakadzraɖoƒe wɔlawo kple kɔmpiuta dɔwɔɖoɖowo wɔlawo. Eɖe mɔ be woawɔ atsyã ɖesiaɖe ƒe kɔpi tso vanilla css me ayi Tailwind CSS me. Ne èzi edzi zi ɖeka la, àte ŋu atrɔ akpa ɖesiaɖe si le internet dzi wòazu Tailwind CSS eye nàzã Tailwind le wò dɔa me eye nàtrɔ asi le atsyã la ŋu le mɔ ɖesiaɖe si nèdi nu.
Xexemenunya si le megbe na Tailwind CSS enye be woalé fɔ ɖe viɖekpɔkpɔ ŋu. Esia fia be le esi teƒe be nàɖe akpa vovovowo ƒe hatsotsowo gɔme do ŋgɔ la, Tailwind CSS naa dɔwɔnu ƒe hatsotso siwo le bɔbɔe siwo nana nète ŋu tua aɖaŋu tɔxɛwo evɔ màdzo le wò HTML me o.
CSS deŋgɔ ateŋu ana woazã nusiwo woɖe ɖe vovo, faɛl siwo fu, kple 'div soup' zazã fũu akpa. Ne ètrɔ yi utility-first CSS framework abe Tailwind CSS ene me la, àteŋu aɖe nya siawo dzi akpɔtɔ, si ana nàkpɔ codebase si le dzadzɛ wu, si le ɖoɖo nu wu.
Utility classes kpena ɖe ŋuwò be màgagbugbɔ atsyã ɖeka ma ke awɔ le wò stylesheets katã me o. Enye gɔmeɖose si nye "Don’t Repeat Yourself" (DRY). Klass siawo ɖea ɣeyiɣi kple agbagbadzedze geɖe dzi kpɔtɔna na wò eye wokplɔa wò yia codebase si ŋu woate ŋu alé be na ŋutɔ gbɔ.
Tailwind CSS to mɔfiame ʋee aɖewo vɛ siwo woateŋu azã le wò atsyãwo me. Esiawo dometɔ aɖewoe nye @apply , @variants , kple @screen. Mɔfiame siawo gɔmesese kple wo zazã ate ŋu ana wò Tailwind CSS nuteƒekpɔkpɔ nanyo ɖe edzi ŋutɔ. Woateŋu atsɔ esiawo ade Tailwind Config CSS faɛl la me. Àte ŋu aŋlɔ css klasswo to mɔnu sia zazã me.
Woateŋu akeke Tailwind CSS ɖe enu kple plugins, atsɔ dɔwɔwɔ yeyewo akpe ɖe eŋu alo atrɔ asi le esi li xoxo ŋu. Srɔ̃ alesi nàwɔ plugins ŋudɔ atsɔ adzi wò web projects ƒe dɔwɔwɔ nyuie kple atsyɔ̃ɖoɖo ɖe edzi.
Tailwind CSS tsɔtsɔ de wò ŋgɔyiyidɔwo me le bɔbɔe, eɖanye xɔtudɔwɔnuwo abe Webpack alo Parcel ene zãm nèle o, alo nèle dɔ wɔm kple ɖoɖowo abe Next.js alo Gatsby ene.
Tailwind CSS dea aɖaŋu si ŋu woate ŋu aɖo bɔbɔe ƒe dzi ƒo to ARIA ƒe nɔnɔme vovovowo dede eƒe klasswo me. Wɔ ŋgɔdonya siwo ŋu woate ŋu aɖo bɔbɔe wu eye nàna zãla ƒe nuteƒekpɔkpɔ nanyo ɖe edzi na amesiame.
Zã egbegbe CSS ɖoɖo modules abe Flexbox kple Grid kple Tailwind CSS. Srɔ̃ alesi woate ŋu azã utility classes atsɔ akpɔ ɖoɖowɔwɔ dzi le mɔ si te ŋu trɔna bɔbɔe eye wòwɔa dɔ nyuie nu.
Tailwind CSS naa dɔwɔnu kple aɖaŋu geɖe siwo wotsɔ ɖɔa vodadawo ɖo siwo nana be dzesidede kple atsyã ƒe kuxiwo gbɔ kpɔkpɔ nɔa bɔbɔe. Se dɔwɔnu siawo gɔme eye nàna wò vodadawo ɖeɖeɖa ƒe ŋutetewo nanyo ɖe edzi.
Tailwind CSS va kple amadede siwo woate ŋu atrɔ asi le ƒe hatsotso gbadza aɖe. Srɔ̃ alesi nàzã amadede siawo ahatrɔ asi le wo ŋu be nàwɔ atsyã siwo me dzo le eye woƒe nukpɔkpɔ dzea ame ŋu.
Ku nu me yi ŋgɔe le Tailwind CSS ƒe Just-In-Time nɔnɔme me. Se alesi wòwɔa dɔe kple alesi wòate ŋu ana wò ŋgɔyiyi kabakaba ŋutɔ eye nàtu ɣeyiɣiwo ɖo gɔme.
Dze mɔzɔzɔ aɖe gɔme be yeabi ɖe Tailwind CSS me. Tso wò nutoa me ɖoɖo dzi va ɖo nyati deŋgɔwo me dzodzro dzi la, mɔfiame sia si me nyawo de to la na nèƒo nu tso eŋu.
Tailwind CSS ƒe ŋusẽ gãtɔwo dometɔ ɖekae nye eƒe asitɔtrɔ le nɔnɔmewo ŋu. Srɔ̃ alesi nàtrɔ asi le Tailwind ŋu wòasɔ ɖe wò dɔa ƒe nuhiahiã tɔxɛwo nu.
Mikpɔ gome le asinusɔsrɔ̃ me to kpɔɖeŋu nyui siwo kplɔ wo nɔewo ɖo me. Ku alesi woatu web ƒe akpa vovovowo to Tailwind CSS kple DaisyUI zazã me.
Èle tɔtrɔ yi Tailwind CSS ŋu bum? Se vovototo vevi siwo le Tailwind kple ɖoɖo bubuwo dome gɔme, eye nàsrɔ̃ mɔnu nyui siwo dzi nàto aʋu wò dɔwo.
Àte ŋu azã DivMagic alo dɔwɔnu mawo tɔgbe atsɔ adzi wò ʋuʋu ƒe duƒuƒu ɖe edzi ŋutɔ.
Nyatakakadzraɖoƒe ƒe dɔwɔnuwo abe DivMagic ene ɖea mɔ na wò be nàte ŋu awɔ kɔpi na nu ɖesiaɖe si wowɔ le atsyã ɖesiaɖe me kple atsyã ɖesiaɖe tso nyatakakadzraɖoƒe ɖesiaɖe dzi kple asiƒoƒo ɖeka.
Alesi nàte ŋu atu kaɖi ƒe akpa si ɖoa nya ŋu to Tailwind CSS zazã me ƒe kpɔɖeŋu aɖee nye esi. Nɔnɔmetata, tanya, kple numeɖeɖe anɔ akpa sia me.
<div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl">
<div class="md:flex">
<div class="md:flex-shrink-0">
<img class="h-48 w-full object-cover md:w-48" src="/img/store.jpg" alt="Store">
</div>
<div class="p-8">
<div class="uppercase tracking-wide text-sm text-indigo-500 font-semibold">Your Product</div>
<p class="mt-2 text-gray-500">This is a brief description of your product. The card uses utility classes for padding, text color, and the uppercase font styling.</p>
</div>
</div>
</div>
Agbalẽvi wɔwɔ kple Tailwind CSS le tẽ eye wòle bɔbɔe. Kadodo ƒe agbalẽvi bɔbɔe aɖee nye esi:
<div class="w-full max-w-xs">
<form class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="username">
Username
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" id="username" type="text" placeholder="Username">
</div>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2" for="password">
Password
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" id="password" type="password" placeholder="******************">
</div>
<div class="flex items-center justify-between">
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" type="button">
Sign In
</button>
</div>
</form>
</div>
Tailwind CSS na be nàte ŋu atrɔ asi le eƒe ɖoɖo gbãtɔ ŋu, atrɔ asi le dɔwɔnu ƒe hatsotsowo ŋu ɖe wò hiahiãwo nu. Le ete la, kpɔɖeŋu aɖe le alesi woatrɔ asi le amadede ƒe hatsotso ŋu.
Kpɔɖeŋu siawo ɖe Tailwind CSS ƒe asitɔtrɔ kple bɔbɔewɔwɔ fia, si ɖe alesi woate ŋu akpe ɖe ŋuwò nàwɔ egbegbe nyatakakadzraɖoƒe ƒe akpa siwo wɔa dɔ nyuie eye woawɔ dɔ nyuie la fia.
module.exports = {
theme: {
extend: {
colors: {
'custom-blue': '#243c5a',
'custom-green': '#387c6d',
}
}
}
}
Fail ɖeka kolia si nèhiã kple Tailwind CSS enye tailwind.config.js faɛl.
Fail ma alé wò ɖoɖowɔɖi ƒe ɖoɖowo ɖe asi. Mànɔ css ŋlɔm alo css faɛl bubu aɖeke anɔ asiwò o. Ðoɖowɔɖi ƒe faɛl sia koe nàhiã.
Ne èdi numeɖeɖe tsitotsito tso Tailwind CSS ƒe React nyuitɔwo ŋu la, taflatse kpɔ míaƒe nyati bubu si nye Tailwind CSS ƒe React nyuitɔwo.
De ŋugble le alesi Tailwind CSS le asi trɔm le web design ƒe etsɔme ŋu. Srɔ̃ nu tso eƒe ŋusẽkpɔɖeamedzi kple alesi wòate ŋu adzi ɖe edzi le nyatakakadzraɖoƒewo wɔwɔ ƒe dɔwɔƒea ŋu.
Nye ame gbãtɔ si nya nu tso nyadzɔdzɔwo, nu yeyewo kple bubuwo ŋu!
Ðe asi le nudɔdɔ ŋu ɣesiaɣi. Spam aɖeke meli o.
© 2024 DivMagic, Inc. Gomenɔamesiwo katã le esi.