All Projects → gadfly361 → Soda Ash

gadfly361 / Soda Ash

Licence: mit
Soda-ash is an interface between clojurescript's Reagent and Semantic UI React

Programming Languages

clojure
4091 projects
clojurescript
191 projects

Projects that are alternatives of or similar to Soda Ash

Gorilla Notebook
A clojure/clojurescript notebook application/-library based on Gorilla-REPL
Stars: ✭ 73 (-52.29%)
Mutual labels:  reagent
Hotel Management System
宾馆管理系统。可以订房、续费、退房、订单管理、员工管理以及业务数据统计可视化展示等
Stars: ✭ 126 (-17.65%)
Mutual labels:  semantic-ui
React Starter Boilerplate Hmr
React starter boilerplate with React Fast Refresh, React 17 and Webpack 5
Stars: ✭ 137 (-10.46%)
Mutual labels:  semantic-ui
Saite
Interactive document creation for exploratory graphics and visualizations. 咲いて (in bloom). Built on top of hanami vega/vega-lite library with CodeMirror and self hosted ClojureScript
Stars: ✭ 89 (-41.83%)
Mutual labels:  reagent
Semantic Edit
✏️ Real-time Preview Enabled Semantic UI Composer
Stars: ✭ 109 (-28.76%)
Mutual labels:  semantic-ui
Re Learn
A library for integrating tutorials into your re-frame/reagent application
Stars: ✭ 131 (-14.38%)
Mutual labels:  reagent
Yet Another Craft
Multiplayer Starcraft game clone in clojure with reagent.
Stars: ✭ 67 (-56.21%)
Mutual labels:  reagent
Javascript Obfuscator Ui
A web UI to the JavaScript Obfuscator node.js package.
Stars: ✭ 142 (-7.19%)
Mutual labels:  semantic-ui
Ventas
Clojure ecommerce platform
Stars: ✭ 114 (-25.49%)
Mutual labels:  reagent
Rid3
Reagent Interface to D3
Stars: ✭ 135 (-11.76%)
Mutual labels:  reagent
Vanilla Semantic Ui
Semantic UI component framework without jQuery
Stars: ✭ 97 (-36.6%)
Mutual labels:  semantic-ui
Road Beyond React App
🌈 The Road beyond React - Thing you can use after learning plain React.js
Stars: ✭ 108 (-29.41%)
Mutual labels:  semantic-ui
React Atom
A simple way manage state in React, inspired by Clojure(Script) and reagent.cljs
Stars: ✭ 133 (-13.07%)
Mutual labels:  reagent
Semantic Kanban
A simple Kanban Component built with Semantic-UI + Vue.js
Stars: ✭ 78 (-49.02%)
Mutual labels:  semantic-ui
Forest Themes
A collection of themes for Semantic UI.
Stars: ✭ 137 (-10.46%)
Mutual labels:  semantic-ui
Hexo Theme Aloha
A hexo theme, use semantic ui.
Stars: ✭ 68 (-55.56%)
Mutual labels:  semantic-ui
Semantic Ui Vue2
Semantic UI Integration for Vue 2
Stars: ✭ 128 (-16.34%)
Mutual labels:  semantic-ui
Carry
ClojureScript application framework.
Stars: ✭ 149 (-2.61%)
Mutual labels:  reagent
Koa2 Blog
第一个web项目,仿照cnode,欢迎新建账号试用
Stars: ✭ 141 (-7.84%)
Mutual labels:  semantic-ui
Bootstrap Table
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Stars: ✭ 11,068 (+7133.99%)
Mutual labels:  semantic-ui

soda-ash

Soda-ash is an interface between clojurescript's reagent and semantic-ui-react.

Usage

Add the following stylesheet to your index.html:

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.0/semantic.min.css"></link>

Put the following in the :dependencies vector of your project.clj

[reagent "0.8.1"]
[soda-ash "0.83.0"]

Then require soda-ash in your namespace.

(ns foo.bar
  (:require [soda-ash.core :as sa]))

Example

Let's take a look at a modal. In javascript, you'd write something like this:

import React from 'react'
import { Button, Header, Image, Modal } from 'semantic-ui-react'

const ModalModalExample = () => (
  <Modal trigger={<Button>Show Modal</Button>}>
    <Modal.Header>Select a Photo</Modal.Header>
    <Modal.Content image>
      <Image wrapped size='medium' src='http://semantic-ui.com/images/avatar2/large/rachel.png' />
      <Modal.Description>
        <Header>Default Profile Image</Header>
        <p>We've found the following gravatar image associated with your e-mail address.</p>
        <p>Is it okay to use this photo?</p>
      </Modal.Description>
    </Modal.Content>
  </Modal>
)

export default ModalModalExample

However, in clojurescript with soda-ash, you'd write something like this:

(ns foo.bar
  (:require
   [reagent.core :as reagent]
   [soda-ash.core :as sa]))

(defn modal-example []
  [sa/Modal {:trigger (reagent/as-element [sa/Button "Show Modal"])}
   [sa/ModalHeader "Select a Photo"]
   [sa/ModalContent {:image true}
    [sa/Image {:wrapped true
               :size    "medium"
               :src     "http://semantic-ui.com/images/avatar2/large/rachel.png"}]
    [sa/ModalDescription
     [sa/Header "Default Profile Image"]
     [:p "We've found the following gravatar image associated with your e-mail address."]
     [:p "Is it okay to use this photo?"]
     ]]])

Gotchas

  • Renamed List to ListSA to avoid confusion with clojure.core/list
  • Renamed Comment to CommentSA to avoid confusion with clojure.core/comment

Related

using semantic ui with re-frame blog post by @kennethkalmer

Sodium is a wrapper around soda-ash. Sodium adds two sets of features into the mix, both aimed at making it easier to include Semantic UI in re-frame projects:

  1. Utility functions to get values in and out of components.
  2. Validity-checking aids to help avoid typos.

Questions

If you have questions, I can usually be found hanging out in the clojurians #reagent slack channel (my handle is @gadfly361).

License

Copyright © 2016 Matthew Jaoudi

Distributed under the The MIT License (MIT).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].