Expand description
The Sycamore prelude.
In most cases, it is idiomatic to use a glob import (aka wildcard import) at the beginning of your Rust source file.
use sycamore::prelude::*;
Re-exports§
pub use crate::reactive::*;
Macros§
- Debug the value of a variable to the JavaScript console if on wasm32. Otherwise logs it to stdout.
- Log a message to the JavaScript console if on wasm32. Otherwise logs it to stdout.
- A macro that expands to whether we are in DOM mode or not.
- A macro that expands to whether we are in SSR mode or not.
- A macro for ergonomically creating complex UI complex layouts.
Structs§
- A special prop type that can be used to spread attributes onto an element.
- A reference to a
web_sys::Node
. This allows imperative access to the node. - Represents a view tree.
Traits§
- A trait that is automatically implemented by all components.
- Attributes that are available on all elements.
- Props that are available on all elements.
- Trait that provides attributes for the
<a>
HTML element. - Trait that provides attributes for the
<abbr>
HTML element. - Trait that provides attributes for the
<address>
HTML element. - Trait that provides attributes for the
<area>
HTML element. - Trait that provides attributes for the
<article>
HTML element. - Trait that provides attributes for the
<aside>
HTML element. - Trait that provides attributes for the
<audio>
HTML element. - Trait that provides attributes for the
<b>
HTML element. - Trait that provides attributes for the
<base>
HTML element. - Trait that provides attributes for the
<bdi>
HTML element. - Trait that provides attributes for the
<bdo>
HTML element. - Trait that provides attributes for the
<blockquote>
HTML element. - Trait that provides attributes for the
<body>
HTML element. - Trait that provides attributes for the
<br>
HTML element. - Trait that provides attributes for the
<button>
HTML element. - Trait that provides attributes for the
<canvas>
HTML element. - Trait that provides attributes for the
<caption>
HTML element. - Trait that provides attributes for the
<cite>
HTML element. - Trait that provides attributes for the
<code>
HTML element. - Trait that provides attributes for the
<col>
HTML element. - Trait that provides attributes for the
<colgroup>
HTML element. - Trait that provides attributes for the
<data>
HTML element. - Trait that provides attributes for the
<datalist>
HTML element. - Trait that provides attributes for the
<dd>
HTML element. - Trait that provides attributes for the
<del>
HTML element. - Trait that provides attributes for the
<details>
HTML element. - Trait that provides attributes for the
<dfn>
HTML element. - Trait that provides attributes for the
<dialog>
HTML element. - Trait that provides attributes for the
<div>
HTML element. - Trait that provides attributes for the
<dl>
HTML element. - Trait that provides attributes for the
<dt>
HTML element. - Trait that provides attributes for the
<em>
HTML element. - Trait that provides attributes for the
<embed>
HTML element. - Trait that provides attributes for the
<fieldset>
HTML element. - Trait that provides attributes for the
<figcaption>
HTML element. - Trait that provides attributes for the
<figure>
HTML element. - Trait that provides attributes for the
<footer>
HTML element. - Trait that provides attributes for the
<form>
HTML element. - A trait that is implemented for all elements and which provides all the global HTML attributes.
- Trait that provides attributes for the
<h1>
HTML element. - Trait that provides attributes for the
<h2>
HTML element. - Trait that provides attributes for the
<h3>
HTML element. - Trait that provides attributes for the
<h4>
HTML element. - Trait that provides attributes for the
<h5>
HTML element. - Trait that provides attributes for the
<h6>
HTML element. - Trait that provides attributes for the
<head>
HTML element. - Trait that provides attributes for the
<header>
HTML element. - Trait that provides attributes for the
<hgroup>
HTML element. - Trait that provides attributes for the
<hr>
HTML element. - Trait that provides attributes for the
<html>
HTML element. - Trait that provides attributes for the
<i>
HTML element. - Trait that provides attributes for the
<iframe>
HTML element. - Trait that provides attributes for the
<img>
HTML element. - Trait that provides attributes for the
<input>
HTML element. - Trait that provides attributes for the
<ins>
HTML element. - Trait that provides attributes for the
<kbd>
HTML element. - Trait that provides attributes for the
<keygen>
HTML element. - Trait that provides attributes for the
<label>
HTML element. - Trait that provides attributes for the
<legend>
HTML element. - Trait that provides attributes for the
<li>
HTML element. - Trait that provides attributes for the
<link>
HTML element. - Trait that provides attributes for the
<main>
HTML element. - Trait that provides attributes for the
<map>
HTML element. - Trait that provides attributes for the
<mark>
HTML element. - Trait that provides attributes for the
<menu>
HTML element. - Trait that provides attributes for the
<menuitem>
HTML element. - Trait that provides attributes for the
<meta>
HTML element. - Trait that provides attributes for the
<meter>
HTML element. - Trait that provides attributes for the
<nav>
HTML element. - Trait that provides attributes for the
<noscript>
HTML element. - Trait that provides attributes for the
<object>
HTML element. - Trait that provides attributes for the
<ol>
HTML element. - Trait that provides attributes for the
<optgroup>
HTML element. - Trait that provides attributes for the
<option>
HTML element. - Trait that provides attributes for the
<output>
HTML element. - Trait that provides attributes for the
<p>
HTML element. - Trait that provides attributes for the
<param>
HTML element. - Trait that provides attributes for the
<picture>
HTML element. - Trait that provides attributes for the
<pre>
HTML element. - Trait that provides attributes for the
<progress>
HTML element. - Trait that provides attributes for the
<q>
HTML element. - Trait that provides attributes for the
<rp>
HTML element. - Trait that provides attributes for the
<rt>
HTML element. - Trait that provides attributes for the
<ruby>
HTML element. - Trait that provides attributes for the
<s>
HTML element. - Trait that provides attributes for the
<samp>
HTML element. - Trait that provides attributes for the
<script>
HTML element. - Trait that provides attributes for the
<section>
HTML element. - Trait that provides attributes for the
<select>
HTML element. - Trait that provides attributes for the
<small>
HTML element. - Trait that provides attributes for the
<source>
HTML element. - Trait that provides attributes for the
<span>
HTML element. - Trait that provides attributes for the
<strong>
HTML element. - Trait that provides attributes for the
<style>
HTML element. - Trait that provides attributes for the
<sub>
HTML element. - Trait that provides attributes for the
<summary>
HTML element. - Trait that provides attributes for the
<sup>
HTML element. - Trait that provides attributes for the
<table>
HTML element. - Trait that provides attributes for the
<tbody>
HTML element. - Trait that provides attributes for the
<td>
HTML element. - Trait that provides attributes for the
<template>
HTML element. - Trait that provides attributes for the
<textarea>
HTML element. - Trait that provides attributes for the
<tfoot>
HTML element. - Trait that provides attributes for the
<th>
HTML element. - Trait that provides attributes for the
<thead>
HTML element. - Trait that provides attributes for the
<time>
HTML element. - Trait that provides attributes for the
<title>
HTML element. - Trait that provides attributes for the
<tr>
HTML element. - Trait that provides attributes for the
<track>
HTML element. - Trait that provides attributes for the
<u>
HTML element. - Trait that provides attributes for the
<ul>
HTML element. - Trait that provides attributes for the
<var>
HTML element. - Trait that provides attributes for the
<video>
HTML element. - Trait that provides attributes for the
<wbr>
HTML element. - A trait that is implemented automatically by the
Props
derive macro. - Trait that provides attributes for the
<animate>
SVG element. - Trait that provides attributes for the
<animateMotion>
SVG element. - Trait that provides attributes for the
<animateTransform>
SVG element. - Trait that provides attributes for the
<circle>
SVG element. - Trait that provides attributes for the
<clipPath>
SVG element. - Trait that provides attributes for the
<defs>
SVG element. - Trait that provides attributes for the
<desc>
SVG element. - Trait that provides attributes for the
<discard>
SVG element. - Trait that provides attributes for the
<ellipse>
SVG element. - Trait that provides attributes for the
<feBlend>
SVG element. - Trait that provides attributes for the
<feColorMatrix>
SVG element. - Trait that provides attributes for the
<feComponentTransfer>
SVG element. - Trait that provides attributes for the
<feComposite>
SVG element. - Trait that provides attributes for the
<feConvolveMatrix>
SVG element. - Trait that provides attributes for the
<feDiffuseLighting>
SVG element. - Trait that provides attributes for the
<feDisplacementMap>
SVG element. - Trait that provides attributes for the
<feDistantLight>
SVG element. - Trait that provides attributes for the
<feDropShadow>
SVG element. - Trait that provides attributes for the
<feFlood>
SVG element. - Trait that provides attributes for the
<feFuncA>
SVG element. - Trait that provides attributes for the
<feFuncB>
SVG element. - Trait that provides attributes for the
<feFuncG>
SVG element. - Trait that provides attributes for the
<feFuncR>
SVG element. - Trait that provides attributes for the
<feGaussianBlur>
SVG element. - Trait that provides attributes for the
<feImage>
SVG element. - Trait that provides attributes for the
<feMerge>
SVG element. - Trait that provides attributes for the
<feMergeNode>
SVG element. - Trait that provides attributes for the
<feMorphology>
SVG element. - Trait that provides attributes for the
<feOffset>
SVG element. - Trait that provides attributes for the
<fePointLight>
SVG element. - Trait that provides attributes for the
<feSpecularLighting>
SVG element. - Trait that provides attributes for the
<feSpotLight>
SVG element. - Trait that provides attributes for the
<feTile>
SVG element. - Trait that provides attributes for the
<feTurbulence>
SVG element. - Trait that provides attributes for the
<filter>
SVG element. - Trait that provides attributes for the
<foreignObject>
SVG element. - Trait that provides attributes for the
<g>
SVG element. - A trait that is implemented for all SVG elements and which provides all the global SVG attributes.
- Trait that provides attributes for the
<hatch>
SVG element. - Trait that provides attributes for the
<hatchpath>
SVG element. - Trait that provides attributes for the
<image>
SVG element. - Trait that provides attributes for the
<line>
SVG element. - Trait that provides attributes for the
<linearGradient>
SVG element. - Trait that provides attributes for the
<marker>
SVG element. - Trait that provides attributes for the
<mask>
SVG element. - Trait that provides attributes for the
<metadata>
SVG element. - Trait that provides attributes for the
<mpath>
SVG element. - Trait that provides attributes for the
<path>
SVG element. - Trait that provides attributes for the
<pattern>
SVG element. - Trait that provides attributes for the
<polygon>
SVG element. - Trait that provides attributes for the
<polyline>
SVG element. - Trait that provides attributes for the
<radialGradient>
SVG element. - Trait that provides attributes for the
<rect>
SVG element. - Trait that provides attributes for the
<set>
SVG element. - Trait that provides attributes for the
<stop>
SVG element. - Trait that provides attributes for the
<svg_a>
SVG element. - Trait that provides attributes for the
<svg>
SVG element. - Trait that provides attributes for the
<svg_script>
SVG element. - Trait that provides attributes for the
<svg_style>
SVG element. - Trait that provides attributes for the
<svg_title>
SVG element. - Trait that provides attributes for the
<switch>
SVG element. - Trait that provides attributes for the
<symbol>
SVG element. - Trait that provides attributes for the
<text>
SVG element. - Trait that provides attributes for the
<textPath>
SVG element. - Trait that provides attributes for the
<tspan>
SVG element. - Trait that provides attributes for the
<use>
SVG element. - Trait that provides attributes for the
<view>
SVG element.
Functions§
- Non keyed iteration (or keyed by index).
- Keyed iteration.
- Create a new
NodeRef
. - Utility function for accessing the global
web_sys::Document
object. - Queue up a callback to be executed when the component is mounted.
- Utility function for accessing the global
web_sys::Window
object.
Type Aliases§
- A type alias for
Children
automatically selecting the correct node type.
Attribute Macros§
- A macro for feature gating code that should only be run on the web.
- A macro for feature gating code that should only be run on the server.
- A macro for creating components from functions.
Derive Macros§
- The derive macro for
Props
. The macro creates a builder-like API used in theview!
macro.