Giter VIP home page Giter VIP logo

surface_bulma's Introduction

SurfaceBulma

A set of simple Surface components based on Bulma.

Documentation and live examples can be found at http://surface-demo.msaraiva.io/uicomponents.

Note: This is not a full-featured suite of components yet. Most of the functionality we have so far is based on the requirements we had to build Surface's website.

Components

  • Button - The classic button, in different colors, sizes, and states. (Thanks Tiago Morais).
  • Table - The inevitable HTML table.
  • Tabs - A simple horizontal navigation tabs component.
  • Form inputs Most of the Form inputs that exist in Surface are now available.
  • Panel component
  • Navbar
  • Dialog (Soon!)
  • Card (Thanks Justin M Morgan)
  • Dropdown (Thanks Justin M Morgan)
  • Message (Thanks Justin M Morgan)

More components will be added soon. Contributions are welcome!

Example

<Table data={{ album <- @albums }} rowClass={{ &rowClass/2 }} bordered>
  <Column label="Album">
    {{ album.name }}
  </Column>
  <Column label="Released">
    {{ album.released }}
  </Column>
  <Column label="Artist">
    <a href="#">{{ album.artist }}</a>
  </Column>
</Table>

Usage

Add surface_bulma to the list of dependencies in mix.exs:

def deps do
  [
    ...
    {:surface_bulma, "~> 0.4.0"}
  ]
end

To use bulma's CSS styles, choose one of the following methods:

1. Using CDN or downloading files

Add the following line to your layout_view.ex:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.8.0/css/bulma.min.css" />

Or download the .css file and manually add it to your priv/static/css folder. In this case, add the following line to your layout_view.ex:

<link rel="stylesheet" href={{ Routes.static_path(@conn, "/css/bulma.min.css") }} />

2. NPM or Yarn

Add bulma to the list of dependencies in assets/package.json:

"dependencies": {
  ...
  "bulma": "0.8.0"
}

License

Copyright (c) 2020, Marlus Saraiva.

Surface source code is licensed under the MIT License.

surface_bulma's People

Contributors

zurga avatar olivermt avatar msaraiva avatar justin-m-morgan avatar aarongraham avatar feliperenan avatar kianmeng avatar michaelst avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.