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§
- console_
dbg  - Debug the value of a variable to the JavaScript console if on wasm32. Otherwise logs it to stdout.
 - console_
log  - Log a message to the JavaScript console if on wasm32. Otherwise logs it to stdout.
 - is_
not_ ssr  - A macro that expands to whether we are in DOM mode or not.
 - is_ssr
 - A macro that expands to whether we are in SSR mode or not.
 - view
 - A macro for ergonomically creating complex UI complex layouts.
 
Structs§
- Attributes
 - A special prop type that can be used to spread attributes onto an element.
 - NodeRef
 - A reference to a 
web_sys::Node. This allows imperative access to the node. - View
 - Represents a view tree.
 
Traits§
- Component
 - A trait that is automatically implemented by all components.
 - Global
Attributes  - Attributes that are available on all elements.
 - Global
Props  - Props that are available on all elements.
 - HtmlA
Attributes  - Trait that provides attributes for the 
<a>HTML element. - Html
Abbr Attributes  - Trait that provides attributes for the 
<abbr>HTML element. - Html
Address Attributes  - Trait that provides attributes for the 
<address>HTML element. - Html
Area Attributes  - Trait that provides attributes for the 
<area>HTML element. - Html
Article Attributes  - Trait that provides attributes for the 
<article>HTML element. - Html
Aside Attributes  - Trait that provides attributes for the 
<aside>HTML element. - Html
Audio Attributes  - Trait that provides attributes for the 
<audio>HTML element. - HtmlB
Attributes  - Trait that provides attributes for the 
<b>HTML element. - Html
Base Attributes  - Trait that provides attributes for the 
<base>HTML element. - Html
BdiAttributes  - Trait that provides attributes for the 
<bdi>HTML element. - Html
BdoAttributes  - Trait that provides attributes for the 
<bdo>HTML element. - Html
Blockquote Attributes  - Trait that provides attributes for the 
<blockquote>HTML element. - Html
Body Attributes  - Trait that provides attributes for the 
<body>HTML element. - Html
BrAttributes  - Trait that provides attributes for the 
<br>HTML element. - Html
Button Attributes  - Trait that provides attributes for the 
<button>HTML element. - Html
Canvas Attributes  - Trait that provides attributes for the 
<canvas>HTML element. - Html
Caption Attributes  - Trait that provides attributes for the 
<caption>HTML element. - Html
Cite Attributes  - Trait that provides attributes for the 
<cite>HTML element. - Html
Code Attributes  - Trait that provides attributes for the 
<code>HTML element. - Html
ColAttributes  - Trait that provides attributes for the 
<col>HTML element. - Html
Colgroup Attributes  - Trait that provides attributes for the 
<colgroup>HTML element. - Html
Data Attributes  - Trait that provides attributes for the 
<data>HTML element. - Html
Datalist Attributes  - Trait that provides attributes for the 
<datalist>HTML element. - Html
DdAttributes  - Trait that provides attributes for the 
<dd>HTML element. - Html
DelAttributes  - Trait that provides attributes for the 
<del>HTML element. - Html
Details Attributes  - Trait that provides attributes for the 
<details>HTML element. - Html
DfnAttributes  - Trait that provides attributes for the 
<dfn>HTML element. - Html
Dialog Attributes  - Trait that provides attributes for the 
<dialog>HTML element. - Html
DivAttributes  - Trait that provides attributes for the 
<div>HTML element. - Html
DlAttributes  - Trait that provides attributes for the 
<dl>HTML element. - Html
DtAttributes  - Trait that provides attributes for the 
<dt>HTML element. - Html
EmAttributes  - Trait that provides attributes for the 
<em>HTML element. - Html
Embed Attributes  - Trait that provides attributes for the 
<embed>HTML element. - Html
Fieldset Attributes  - Trait that provides attributes for the 
<fieldset>HTML element. - Html
Figcaption Attributes  - Trait that provides attributes for the 
<figcaption>HTML element. - Html
Figure Attributes  - Trait that provides attributes for the 
<figure>HTML element. - Html
Footer Attributes  - Trait that provides attributes for the 
<footer>HTML element. - Html
Form Attributes  - Trait that provides attributes for the 
<form>HTML element. - Html
Global Attributes  - A trait that is implemented for all elements and which provides all the global HTML attributes.
 - Html
H1Attributes  - Trait that provides attributes for the 
<h1>HTML element. - Html
H2Attributes  - Trait that provides attributes for the 
<h2>HTML element. - Html
H3Attributes  - Trait that provides attributes for the 
<h3>HTML element. - Html
H4Attributes  - Trait that provides attributes for the 
<h4>HTML element. - Html
H5Attributes  - Trait that provides attributes for the 
<h5>HTML element. - Html
H6Attributes  - Trait that provides attributes for the 
<h6>HTML element. - Html
Head Attributes  - Trait that provides attributes for the 
<head>HTML element. - Html
Header Attributes  - Trait that provides attributes for the 
<header>HTML element. - Html
Hgroup Attributes  - Trait that provides attributes for the 
<hgroup>HTML element. - Html
HrAttributes  - Trait that provides attributes for the 
<hr>HTML element. - Html
Html Attributes  - Trait that provides attributes for the 
<html>HTML element. - HtmlI
Attributes  - Trait that provides attributes for the 
<i>HTML element. - Html
Iframe Attributes  - Trait that provides attributes for the 
<iframe>HTML element. - Html
ImgAttributes  - Trait that provides attributes for the 
<img>HTML element. - Html
Input Attributes  - Trait that provides attributes for the 
<input>HTML element. - Html
InsAttributes  - Trait that provides attributes for the 
<ins>HTML element. - Html
KbdAttributes  - Trait that provides attributes for the 
<kbd>HTML element. - Html
Keygen Attributes  - Trait that provides attributes for the 
<keygen>HTML element. - Html
Label Attributes  - Trait that provides attributes for the 
<label>HTML element. - Html
Legend Attributes  - Trait that provides attributes for the 
<legend>HTML element. - Html
LiAttributes  - Trait that provides attributes for the 
<li>HTML element. - Html
Link Attributes  - Trait that provides attributes for the 
<link>HTML element. - Html
Main Attributes  - Trait that provides attributes for the 
<main>HTML element. - Html
MapAttributes  - Trait that provides attributes for the 
<map>HTML element. - Html
Mark Attributes  - Trait that provides attributes for the 
<mark>HTML element. - Html
Menu Attributes  - Trait that provides attributes for the 
<menu>HTML element. - Html
Menuitem Attributes  - Trait that provides attributes for the 
<menuitem>HTML element. - Html
Meta Attributes  - Trait that provides attributes for the 
<meta>HTML element. - Html
Meter Attributes  - Trait that provides attributes for the 
<meter>HTML element. - Html
NavAttributes  - Trait that provides attributes for the 
<nav>HTML element. - Html
Noscript Attributes  - Trait that provides attributes for the 
<noscript>HTML element. - Html
Object Attributes  - Trait that provides attributes for the 
<object>HTML element. - Html
OlAttributes  - Trait that provides attributes for the 
<ol>HTML element. - Html
Optgroup Attributes  - Trait that provides attributes for the 
<optgroup>HTML element. - Html
Option Attributes  - Trait that provides attributes for the 
<option>HTML element. - Html
Output Attributes  - Trait that provides attributes for the 
<output>HTML element. - HtmlP
Attributes  - Trait that provides attributes for the 
<p>HTML element. - Html
Param Attributes  - Trait that provides attributes for the 
<param>HTML element. - Html
Picture Attributes  - Trait that provides attributes for the 
<picture>HTML element. - Html
PreAttributes  - Trait that provides attributes for the 
<pre>HTML element. - Html
Progress Attributes  - Trait that provides attributes for the 
<progress>HTML element. - HtmlQ
Attributes  - Trait that provides attributes for the 
<q>HTML element. - Html
RpAttributes  - Trait that provides attributes for the 
<rp>HTML element. - Html
RtAttributes  - Trait that provides attributes for the 
<rt>HTML element. - Html
Ruby Attributes  - Trait that provides attributes for the 
<ruby>HTML element. - HtmlS
Attributes  - Trait that provides attributes for the 
<s>HTML element. - Html
Samp Attributes  - Trait that provides attributes for the 
<samp>HTML element. - Html
Script Attributes  - Trait that provides attributes for the 
<script>HTML element. - Html
Section Attributes  - Trait that provides attributes for the 
<section>HTML element. - Html
Select Attributes  - Trait that provides attributes for the 
<select>HTML element. - Html
Small Attributes  - Trait that provides attributes for the 
<small>HTML element. - Html
Source Attributes  - Trait that provides attributes for the 
<source>HTML element. - Html
Span Attributes  - Trait that provides attributes for the 
<span>HTML element. - Html
Strong Attributes  - Trait that provides attributes for the 
<strong>HTML element. - Html
Style Attributes  - Trait that provides attributes for the 
<style>HTML element. - Html
SubAttributes  - Trait that provides attributes for the 
<sub>HTML element. - Html
Summary Attributes  - Trait that provides attributes for the 
<summary>HTML element. - Html
SupAttributes  - Trait that provides attributes for the 
<sup>HTML element. - Html
Table Attributes  - Trait that provides attributes for the 
<table>HTML element. - Html
Tbody Attributes  - Trait that provides attributes for the 
<tbody>HTML element. - Html
TdAttributes  - Trait that provides attributes for the 
<td>HTML element. - Html
Template Attributes  - Trait that provides attributes for the 
<template>HTML element. - Html
Textarea Attributes  - Trait that provides attributes for the 
<textarea>HTML element. - Html
Tfoot Attributes  - Trait that provides attributes for the 
<tfoot>HTML element. - Html
ThAttributes  - Trait that provides attributes for the 
<th>HTML element. - Html
Thead Attributes  - Trait that provides attributes for the 
<thead>HTML element. - Html
Time Attributes  - Trait that provides attributes for the 
<time>HTML element. - Html
Title Attributes  - Trait that provides attributes for the 
<title>HTML element. - Html
TrAttributes  - Trait that provides attributes for the 
<tr>HTML element. - Html
Track Attributes  - Trait that provides attributes for the 
<track>HTML element. - HtmlU
Attributes  - Trait that provides attributes for the 
<u>HTML element. - Html
UlAttributes  - Trait that provides attributes for the 
<ul>HTML element. - Html
VarAttributes  - Trait that provides attributes for the 
<var>HTML element. - Html
Video Attributes  - Trait that provides attributes for the 
<video>HTML element. - Html
WbrAttributes  - Trait that provides attributes for the 
<wbr>HTML element. - Props
 - A trait that is implemented automatically by the 
Propsderive macro. - SvgAnimate
Attributes  - Trait that provides attributes for the 
<animate>SVG element. - SvgAnimate
Motion Attributes  - Trait that provides attributes for the 
<animateMotion>SVG element. - SvgAnimate
Transform Attributes  - Trait that provides attributes for the 
<animateTransform>SVG element. - SvgCircle
Attributes  - Trait that provides attributes for the 
<circle>SVG element. - SvgClip
Path Attributes  - Trait that provides attributes for the 
<clipPath>SVG element. - SvgDefs
Attributes  - Trait that provides attributes for the 
<defs>SVG element. - SvgDesc
Attributes  - Trait that provides attributes for the 
<desc>SVG element. - SvgDiscard
Attributes  - Trait that provides attributes for the 
<discard>SVG element. - SvgEllipse
Attributes  - Trait that provides attributes for the 
<ellipse>SVG element. - SvgFe
Blend Attributes  - Trait that provides attributes for the 
<feBlend>SVG element. - SvgFe
Color Matrix Attributes  - Trait that provides attributes for the 
<feColorMatrix>SVG element. - SvgFe
Component Transfer Attributes  - Trait that provides attributes for the 
<feComponentTransfer>SVG element. - SvgFe
Composite Attributes  - Trait that provides attributes for the 
<feComposite>SVG element. - SvgFe
Convolve Matrix Attributes  - Trait that provides attributes for the 
<feConvolveMatrix>SVG element. - SvgFe
Diffuse Lighting Attributes  - Trait that provides attributes for the 
<feDiffuseLighting>SVG element. - SvgFe
Displacement MapAttributes  - Trait that provides attributes for the 
<feDisplacementMap>SVG element. - SvgFe
Distant Light Attributes  - Trait that provides attributes for the 
<feDistantLight>SVG element. - SvgFe
Drop Shadow Attributes  - Trait that provides attributes for the 
<feDropShadow>SVG element. - SvgFe
Flood Attributes  - Trait that provides attributes for the 
<feFlood>SVG element. - SvgFe
FuncA Attributes  - Trait that provides attributes for the 
<feFuncA>SVG element. - SvgFe
FuncB Attributes  - Trait that provides attributes for the 
<feFuncB>SVG element. - SvgFe
FuncG Attributes  - Trait that provides attributes for the 
<feFuncG>SVG element. - SvgFe
FuncR Attributes  - Trait that provides attributes for the 
<feFuncR>SVG element. - SvgFe
Gaussian Blur Attributes  - Trait that provides attributes for the 
<feGaussianBlur>SVG element. - SvgFe
Image Attributes  - Trait that provides attributes for the 
<feImage>SVG element. - SvgFe
Merge Attributes  - Trait that provides attributes for the 
<feMerge>SVG element. - SvgFe
Merge Node Attributes  - Trait that provides attributes for the 
<feMergeNode>SVG element. - SvgFe
Morphology Attributes  - Trait that provides attributes for the 
<feMorphology>SVG element. - SvgFe
Offset Attributes  - Trait that provides attributes for the 
<feOffset>SVG element. - SvgFe
Point Light Attributes  - Trait that provides attributes for the 
<fePointLight>SVG element. - SvgFe
Specular Lighting Attributes  - Trait that provides attributes for the 
<feSpecularLighting>SVG element. - SvgFe
Spot Light Attributes  - Trait that provides attributes for the 
<feSpotLight>SVG element. - SvgFe
Tile Attributes  - Trait that provides attributes for the 
<feTile>SVG element. - SvgFe
Turbulence Attributes  - Trait that provides attributes for the 
<feTurbulence>SVG element. - SvgFilter
Attributes  - Trait that provides attributes for the 
<filter>SVG element. - SvgForeign
Object Attributes  - Trait that provides attributes for the 
<foreignObject>SVG element. - SvgG
Attributes  - Trait that provides attributes for the 
<g>SVG element. - SvgGlobal
Attributes  - A trait that is implemented for all SVG elements and which provides all the global SVG attributes.
 - SvgHatch
Attributes  - Trait that provides attributes for the 
<hatch>SVG element. - SvgHatchpath
Attributes  - Trait that provides attributes for the 
<hatchpath>SVG element. - SvgImage
Attributes  - Trait that provides attributes for the 
<image>SVG element. - SvgLine
Attributes  - Trait that provides attributes for the 
<line>SVG element. - SvgLinear
Gradient Attributes  - Trait that provides attributes for the 
<linearGradient>SVG element. - SvgMarker
Attributes  - Trait that provides attributes for the 
<marker>SVG element. - SvgMask
Attributes  - Trait that provides attributes for the 
<mask>SVG element. - SvgMetadata
Attributes  - Trait that provides attributes for the 
<metadata>SVG element. - SvgMpath
Attributes  - Trait that provides attributes for the 
<mpath>SVG element. - SvgPath
Attributes  - Trait that provides attributes for the 
<path>SVG element. - SvgPattern
Attributes  - Trait that provides attributes for the 
<pattern>SVG element. - SvgPolygon
Attributes  - Trait that provides attributes for the 
<polygon>SVG element. - SvgPolyline
Attributes  - Trait that provides attributes for the 
<polyline>SVG element. - SvgRadial
Gradient Attributes  - Trait that provides attributes for the 
<radialGradient>SVG element. - SvgRect
Attributes  - Trait that provides attributes for the 
<rect>SVG element. - SvgSet
Attributes  - Trait that provides attributes for the 
<set>SVG element. - SvgStop
Attributes  - Trait that provides attributes for the 
<stop>SVG element. - SvgSvgA
Attributes  - Trait that provides attributes for the 
<svg_a>SVG element. - SvgSvg
Attributes  - Trait that provides attributes for the 
<svg>SVG element. - SvgSvg
Script Attributes  - Trait that provides attributes for the 
<svg_script>SVG element. - SvgSvg
Style Attributes  - Trait that provides attributes for the 
<svg_style>SVG element. - SvgSvg
Title Attributes  - Trait that provides attributes for the 
<svg_title>SVG element. - SvgSwitch
Attributes  - Trait that provides attributes for the 
<switch>SVG element. - SvgSymbol
Attributes  - Trait that provides attributes for the 
<symbol>SVG element. - SvgText
Attributes  - Trait that provides attributes for the 
<text>SVG element. - SvgText
Path Attributes  - Trait that provides attributes for the 
<textPath>SVG element. - SvgTspan
Attributes  - Trait that provides attributes for the 
<tspan>SVG element. - SvgUse
Attributes  - Trait that provides attributes for the 
<use>SVG element. - SvgView
Attributes  - Trait that provides attributes for the 
<view>SVG element. 
Functions§
- Indexed
 - Non keyed iteration (or keyed by index).
 - Keyed
 - Keyed iteration.
 - create_
node_ ref  - Create a new 
NodeRef. - document
 - Utility function for accessing the global 
web_sys::Documentobject. - on_
mount  - Queue up a callback to be executed when the component is mounted.
 - window
 - Utility function for accessing the global 
web_sys::Windowobject. 
Type Aliases§
Attribute Macros§
- cfg_
not_ ssr  - A macro for feature gating code that should only be run on the web.
 - cfg_ssr
 - A macro for feature gating code that should only be run on the server.
 - component
 - A macro for creating components from functions.