View Source API Reference Surface v0.12.1
Modules
Surface is a component based library for Phoenix LiveView.
An AST node representing an attribute or property
An AST node representing an attribute expression (i.e. a dynamic value for an attribute, directive, or property)
An AST node representing a generic block.
An AST node representing a component
An AST node representing a container of other nodes. This does not have content itself, just contains children which have content, and directives that operate on the entirety of the children (i.e. for, if, debug)
An AST node representing a directive
An AST node representing a dynamic attribute (or attributes).
An AST node representing an error. This will be rendered as an html element.
An AST node representing an expression which does not resolve to a value printed out to the final DOM.
An AST node representing a for comprehension.
An AST node representing a function component
An AST node representing an if/else expression
An AST node representing interpolation within a node
An AST node representing a literal value
An AST node representing a macro component
A container for metadata about compilation.
An AST node representing a <#slot /> tag
An AST node representing a <:slot> entry. This is used to provide content for slots
An AST node representing a standard HTML tag
An AST node representing a generic sub-block.
An AST node representing a standard HTML tag
An AST node representing a void (empty) HTML tag
A behaviour to provide additional information about the catalogue.
Experimental module that provides conveniences for manipulating data in Examples and Playgrounds.
A generic LiveView to create multiple stateless examples for the Surface Catalogue.
A generic LiveView to create a single live example for the Surface Catalogue.
A generic LiveView to create a component's playground for the Surface Catalogue.
An exception raised when there's a Surface compile error.
Defines a behaviour that must be implemented by all HTML/Surface node translators.
This module glues together surface's AST and Phoenix.LiveView.Engine to actually render an AST.
Defines a stateless component.
Deprecation warning
Using this module as a component with
<Context>
has been deprecated. Support for scope-aware context will be removed inv0.13
due to the lack of built-in support for the feature in Liveview itself, which leads to inefficient diff-tracking when using it.
A built-in component that allows users to inject dynamic components into a Surface template.
A built-in component that allows users to inject dynamic live components into a Surface template.
Deprecation warning
This component has been deprecated in favor of liveview's built-in
<.link>
and will be removed inv0.13
. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info and usage.
Deprecation warning
This component has been deprecated in favor of liveview's built-in
<.link>
and will be removed inv0.13
. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info and usage.
Deprecation warning
This component has been deprecated in favor of liveview's built-in
<.link>
and will be removed inv0.13
. See https://hexdocs.pm/phoenix_live_view/live-navigation.html for more info and usage.
A macro component that does not translate any of its contents.
An Elixir formatter plugin for Surface code.
A live stateful component. A wrapper around Phoenix.LiveComponent
.
A wrapper component around Phoenix.LiveView
.
Conveniences for testing Surface components.
A low-level component which is responsible for translating its own content at compile time.
Use this module on regular Phoenix views to enable .sface templates
Mix Tasks
Generate CSS and JS/TS assets for components.
Converts .sface files and ~F sigils from v0.7 to v0.8 syntax.
Formatter Plugin Preferred
To format Surface code using Elixir 1.13 or later, use
Surface.Formatter.Plugin
.
Configures Surface on an phoenix project.