surface alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view surface alternatives based on common mentions on social networks and blogs.
-
ex_admin
ExAdmin is an auto administration package for Elixir and the Phoenix Framework -
phoenix_html
Phoenix.HTML functions for working with HTML strings and templates -
phoenix_ecto
Phoenix and Ecto integration with support for concurrent acceptance testing -
absinthe_plug
Plug support for Absinthe, the GraphQL toolkit for Elixir -
phoenix_live_reload
Provides live-reload functionality for Phoenix -
params
Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters. -
phoenix_pubsub_redis
The Redis PubSub adapter for the Phoenix framework -
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
sentinel
DEPRECATED - Phoenix Authentication library that wraps Guardian for extra functionality -
plug_rails_cookie_session_store
Rails compatible Plug session store -
phx_component_helpers
Extensible Phoenix liveview components, without boilerplate -
multiverse
Elixir package that allows to add compatibility layers via API gateways. -
filterable
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL. -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
better_params
Cleaner request parameters in Elixir web applications ๐ -
scrivener_headers
Scrivener pagination with headers and web linking -
phoenix_pubsub_rabbitmq
RabbitMQ adapter for Phoenix's PubSub layer -
plug_checkup
PlugCheckup provides a Plug for adding simple health checks to your app -
plug_rest
REST behaviour and Plug router for hypermedia web applications in Elixir -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
phoenix_html_simplified_helpers
Some helpers for phoenix html( truncate, time_ago_in_words, number_with_delimiter, url_for, current_page? ) -
plug_canonical_host
PlugCanonicalHost ensures that all requests are served by a single canonical host.
Elixir and Phoenix Application Security Platform
Do you think we are missing an alternative of surface or a related project?
README
Surface
Surface is a server-side rendering component library that allows developers to build rich interactive user-interfaces, writing minimal custom Javascript.
Built on top of Phoenix LiveView and its component API, Surface leverages the amazing Phoenix Framework to provide a fast and productive solution to build modern web applications.
Full documentation and live examples can be found at surface-ui.org.
Example
# Defining the component
defmodule Hello do
use Surface.Component
@doc "Someone to say hello to"
prop name, :string, required: true
def render(assigns) do
~F"""
Hello, {@name}!
"""
end
end
# Using the component
defmodule Example do
use Surface.Component
def render(assigns) do
~F"""
<Hello name="John Doe"/>
"""
end
end
Features
An HTML-centric templating language, designed specifically to improve development experience.
Components as modules - they can be stateless, stateful, renderless or compile-time.
Declarative properties - explicitly declare the inputs (properties and events) of each component.
Slots - placeholders declared by a component that you can fill up with custom content.
Contexts - allows a parent component to share data with its children without passing them as properties.
Compile-time checking of the template structure, components' properties, slots, events and more.
Integration with editor/tools for warnings/errors, syntax highlighting, jump-to-definition, auto-completion (soon!) and more.
Installation
Phoenix v1.6 comes with built-in support for LiveView apps. You can create a new phoenix application with:
mix phx.new my_app
Note: In case you want to add Surface to an existing Phoenix application that doesn't have LiveView properly installed, please see Phoenix Liveview's installation instructions at hexdocs.pm/phoenix_live_view/installation.html.
Add surface
to the list of dependencies in mix.exs
:
def deps do
[
{:surface, "~> 0.9.0"}
]
end
Configuring the project using mix surface.init
After fetching the dependencies with mix deps.get
, you can run the surface.init
task to
update the necessary files in your project.
In case you want the task to also generate a sample component for you, use can use the --demo
option.
A liveview using the component will be available at the /demo
route.
Additionally, the task can also set up a Surface Catalogue
for your project using the --catalogue
option. The catalogue will be available at /catalogue
.
Note: When using the
--demo
and--catalogue
options together, the task also generates two catalogue examples and a playground for the sample component.
mix surface.init --demo --catalogue
Start the Phoenix server with:
mix phx.server
That's it! You can now access your application at http://localhost:4000.
You can see the full list of options provided by surface.init
by running:
mix help surface.init
For further information regarding installation, including how to install Surface manually, please visit the Getting Started guide.
Migrating from previous versions
Please see the [Migration Guide](MIGRATING.md) for details.
Tooling
- Surface Formatter - A code formatter for Surface.
- Surface package for VS Code - Syntax highlighting support for Surface/Elixir.
License
Copyright (c) 2020, Marlus Saraiva.
Surface source code is licensed under the [MIT License](LICENSE.md).
*Note that all licence references and agreements mentioned in the surface README section above
are relevant to that project's source code only.