Semagent use reagent making semantic-ui easy to use, easy to change css classes.
The original intention is when I writing component with reagent and semantic-ui, like this:
[:ui.primary.icon.button "..."]
It's to hard to modifiy classes :). So I make it into:
[Button
{:s [:primary :icon]
:tag :div}
"..."]
Easy to change classes :blush:.
Add this to you dependencies in your project.clj
:
[semagent "0.3.1"]
Then:
(:require [reagent.core :as r]
[semagent.core :as s])
Add this to you dependencies in your project.clj
:
[semagent "0.2.0"]
Then:
(:require [reagent.core :as r]
[semagent.elements.Button :refer [Button Buttons]]
[semagent.elements.Container :refer [Container]]
[semagent.collections.Breadcrumb :refer [Breadcrumb]]
[semagent.views.Card :refer [Card]])
Or all:
(:require [reagent.core :as r]
[semagent.sum :as s])
Put classes in the vector of {:s []}
, with the keyword style:
when the version < 0.3.0, use {:sema []}
[Buttons {:s :vertical :class "test"}
[Button {:s :red} "un"]
[Button {:s :primary} "or"]
[Button {:s :positive} "deux"]]
Change default tag with :tag + :keyword, like:
[Button
{:s [:primary :icon]
:tag :div}
"..."]
Whether to insert ui class:
[Menu
{:s :right
:ui? false}
"..."]
To get an interactive development environment run:
lein figwheel
and open your browser at localhost:3449.
To clean all compiled files:
lein clean
Copyright © 2017 g1eny0ung
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Can you improve this documentation? These fine people already did:
G1enY0ung & g1eny0ungEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close