miso
Copyright(C) 2016-2026 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Svg.Property

Description

Overview

Miso.Svg.Property provides Attribute smart constructors for all SVG attributes. Every combinator takes a MisoString value and produces an Attribute that is set on the SVG element by the virtual DOM.

This module is not re-exported by Miso.Svg and must be imported separately. Qualify it to avoid clashing with same-named combinators from Miso.Html.Property:

import qualified Miso.Svg.Property as SP

Quick start

import Miso.Svg
import qualified Miso.Svg.Property as SP

arrow :: View model action
arrow =
  svg_ [ SP.viewBox_ "0 0 100 100", SP.width_ "100" ]
    [ path_
        [ SP.d_           "M 10 50 L 90 50 M 70 30 L 90 50 L 70 70"
        , SP.stroke_      "black"
        , SP.strokeWidth_ "4"
        , SP.fill_        "none"
        , SP.strokeLinecap_ "round"
        ]
    ]

Attribute groups

Note: Two SVG attributes clash with Haskell keywords and are given disambiguated names: 'in_'' (for the in attribute) and 'type_'' (for the type attribute).

See also

Synopsis

Regular Attributes

accumulate_ :: MisoString -> Attribute model action Source #

accumulate attribute

additive_ :: MisoString -> Attribute model action Source #

additive attribute

amplitude_ :: MisoString -> Attribute model action Source #

amplitude attribute

azimuth_ :: MisoString -> Attribute model action Source #

azimuth attribute

begin_ :: MisoString -> Attribute model action Source #

begin attribute

bias_ :: MisoString -> Attribute model action Source #

bias attribute

by_ :: MisoString -> Attribute model action Source #

by attribute

calcMode_ :: MisoString -> Attribute model action Source #

calcMode attribute

cx_ :: MisoString -> Attribute model action Source #

cx attribute

cy_ :: MisoString -> Attribute model action Source #

cy attribute

d_ :: MisoString -> Attribute model action Source #

d attribute

decoding_ :: MisoString -> Attribute model action Source #

decoding attribute

Since: 1.9.0.0

divisor_ :: MisoString -> Attribute model action Source #

divisor attribute

dur_ :: MisoString -> Attribute model action Source #

dur attribute

dx_ :: MisoString -> Attribute model action Source #

dx attribute

dy_ :: MisoString -> Attribute model action Source #

dy attribute

edgeMode_ :: MisoString -> Attribute model action Source #

edgeMode attribute

elevation_ :: MisoString -> Attribute model action Source #

elevation attribute

end_ :: MisoString -> Attribute model action Source #

end attribute

exponent_ :: MisoString -> Attribute model action Source #

exponent attribute

filterUnits_ :: MisoString -> Attribute model action Source #

filterUnits attribute

fr_ :: MisoString -> Attribute model action Source #

fr attribute

Since: 1.9.0.0

from_ :: MisoString -> Attribute model action Source #

from attribute

fx_ :: MisoString -> Attribute model action Source #

fx attribute

fy_ :: MisoString -> Attribute model action Source #

fy attribute

in_' :: MisoString -> Attribute model action Source #

in attribute

in2_ :: MisoString -> Attribute model action Source #

in2 attribute

intercept_ :: MisoString -> Attribute model action Source #

intercept attribute

k1_ :: MisoString -> Attribute model action Source #

k1 attribute

k2_ :: MisoString -> Attribute model action Source #

k2 attribute

k3_ :: MisoString -> Attribute model action Source #

k3 attribute

k4_ :: MisoString -> Attribute model action Source #

k4 attribute

keyPoints_ :: MisoString -> Attribute model action Source #

keyPoints attribute

keySplines_ :: MisoString -> Attribute model action Source #

keySplines attribute

keyTimes_ :: MisoString -> Attribute model action Source #

keyTimes attribute

markerUnits_ :: MisoString -> Attribute model action Source #

markerUnits attribute

markerWidth_ :: MisoString -> Attribute model action Source #

markerWidth attribute

maskUnits_ :: MisoString -> Attribute model action Source #

maskUnits attribute

max_ :: MisoString -> Attribute model action Source #

max attribute

media_ :: MisoString -> Attribute model action Source #

media attribute

method_ :: MisoString -> Attribute model action Source #

method attribute

min_ :: MisoString -> Attribute model action Source #

min attribute

mode_ :: MisoString -> Attribute model action Source #

mode attribute

numOctaves_ :: MisoString -> Attribute model action Source #

numOctaves attribute

offset_ :: MisoString -> Attribute model action Source #

offset attribute

operator_ :: MisoString -> Attribute model action Source #

operator attribute

order_ :: MisoString -> Attribute model action Source #

order attribute

orient_ :: MisoString -> Attribute model action Source #

orient attribute

origin_ :: MisoString -> Attribute model action Source #

origin attribute

paintOrder_ :: MisoString -> Attribute model action Source #

paint-order attribute

Since: 1.9.0.0

path_ :: MisoString -> Attribute model action Source #

path attribute

pathLength_ :: MisoString -> Attribute model action Source #

pathLength attribute

points_ :: MisoString -> Attribute model action Source #

points attribute

pointsAtX_ :: MisoString -> Attribute model action Source #

pointsAtX attribute

pointsAtY_ :: MisoString -> Attribute model action Source #

pointsAtY attribute

pointsAtZ_ :: MisoString -> Attribute model action Source #

pointsAtZ attribute

r_ :: MisoString -> Attribute model action Source #

r attribute

radius_ :: MisoString -> Attribute model action Source #

radius attribute

refX_ :: MisoString -> Attribute model action Source #

refX attribute

refY_ :: MisoString -> Attribute model action Source #

refY attribute

repeatCount_ :: MisoString -> Attribute model action Source #

repeatCount attribute

repeatDur_ :: MisoString -> Attribute model action Source #

repeatDur attribute

restart_ :: MisoString -> Attribute model action Source #

restart attribute

result_ :: MisoString -> Attribute model action Source #

result attribute

rotate_ :: MisoString -> Attribute model action Source #

rotate attribute

rx_ :: MisoString -> Attribute model action Source #

rx attribute

ry_ :: MisoString -> Attribute model action Source #

ry attribute

scale_ :: MisoString -> Attribute model action Source #

scale attribute

seed_ :: MisoString -> Attribute model action Source #

seed attribute

side_ :: MisoString -> Attribute model action Source #

side attribute

Since: 1.9.0.0

slope_ :: MisoString -> Attribute model action Source #

slope attribute

spacing_ :: MisoString -> Attribute model action Source #

spacing attribute

startOffset_ :: MisoString -> Attribute model action Source #

startOffset attribute

stitchTiles_ :: MisoString -> Attribute model action Source #

stitchTiles attribute

tableValues_ :: MisoString -> Attribute model action Source #

tableValues attribute

target_ :: MisoString -> Attribute model action Source #

target attribute

targetX_ :: MisoString -> Attribute model action Source #

targetX attribute

targetY_ :: MisoString -> Attribute model action Source #

targetY attribute

textLength_ :: MisoString -> Attribute model action Source #

textLength attribute

to_ :: MisoString -> Attribute model action Source #

to attribute

transform_ :: MisoString -> Attribute model action Source #

transform attribute

transformOrigin_ :: MisoString -> Attribute model action Source #

transform-origin attribute

Since: 1.9.0.0

type_' :: MisoString -> Attribute model action Source #

type attribute

values_ :: MisoString -> Attribute model action Source #

values attribute

vectorEffect_ :: MisoString -> Attribute model action Source #

vector-effect attribute

Since: 1.9.0.0

viewBox_ :: MisoString -> Attribute model action Source #

viewBox attribute

x_ :: MisoString -> Attribute model action Source #

x attribute

x1_ :: MisoString -> Attribute model action Source #

x1 attribute

x2_ :: MisoString -> Attribute model action Source #

x2 attribute

y_ :: MisoString -> Attribute model action Source #

y attribute

y1_ :: MisoString -> Attribute model action Source #

y1 attribute

y2_ :: MisoString -> Attribute model action Source #

y2 attribute

z_ :: MisoString -> Attribute model action Source #

z attribute

Presentation attributes

All SVG presentation attributes can be used as CSS properties.

clipPath_ :: MisoString -> Attribute model action Source #

clip-path attribute

clipRule_ :: MisoString -> Attribute model action Source #

clip-rule attribute

color_ :: MisoString -> Attribute model action Source #

color attribute

crossorigin_ :: MisoString -> Attribute model action Source #

crossorigin attribute

Since: 1.9.0.0

cursor_ :: MisoString -> Attribute model action Source #

cursor attribute

direction_ :: MisoString -> Attribute model action Source #

direction attribute

display_ :: MisoString -> Attribute model action Source #

display attribute

fill_ :: MisoString -> Attribute model action Source #

fill attribute

fillRule_ :: MisoString -> Attribute model action Source #

fill-rule attribute

filter_ :: MisoString -> Attribute model action Source #

filter attribute

floodColor_ :: MisoString -> Attribute model action Source #

flood-color attribute

fontFamily_ :: MisoString -> Attribute model action Source #

font-family attribute

fontSize_ :: MisoString -> Attribute model action Source #

font-size attribute

fontStyle_ :: MisoString -> Attribute model action Source #

font-style attribute

fontWeight_ :: MisoString -> Attribute model action Source #

font-weight attribute

markerEnd_ :: MisoString -> Attribute model action Source #

marker-end attribute

markerMid_ :: MisoString -> Attribute model action Source #

marker-mid attribute

mask_ :: MisoString -> Attribute model action Source #

mask attribute

opacity_ :: MisoString -> Attribute model action Source #

opacity attribute

overflow_ :: MisoString -> Attribute model action Source #

overflow attribute

stopColor_ :: MisoString -> Attribute model action Source #

stop-color attribute

stroke_ :: MisoString -> Attribute model action Source #

stroke attribute

textAnchor_ :: MisoString -> Attribute model action Source #

text-anchor attribute

visibility_ :: MisoString -> Attribute model action Source #

visibility attribute