Skip to content

SVG Tags T-Z

Air is proud to provide first class SVG support. The entire SVG specification is supported.

Text

Text(
    *children,
    x=None,
    y=None,
    dx=None,
    dy=None,
    rotate=None,
    lengthAdjust=None,
    textLength=None,
    class_=None,
    id=None,
    style=None,
    **kwargs,
)

Bases: CaseTag

Defines text content

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
x str | float | None

X-coordinates of text baseline.

None
y str | float | None

Y-coordinates of text baseline.

None
dx str | float | None

Horizontal shift from previous text.

None
dy str | float | None

Vertical shift from previous text.

None
rotate str | None

Rotation of individual glyphs.

None
lengthAdjust str | None

Text stretching method.

None
textLength str | float | None

Target width for text scaling.

None
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
def __init__(
    self,
    *children: Any,
    x: str | float | None = None,
    y: str | float | None = None,
    dx: str | float | None = None,
    dy: str | float | None = None,
    rotate: str | None = None,
    lengthAdjust: str | None = None,
    textLength: str | float | None = None,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))

TextPath

TextPath(
    *children,
    href=None,
    lengthAdjust=None,
    method=None,
    path=None,
    side=None,
    spacing=None,
    startOffset=None,
    textLength=None,
    class_=None,
    id=None,
    style=None,
    **kwargs,
)

Bases: CaseTag

Defines text along a path

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
href str | None

Reference to path element for text layout.

None
lengthAdjust str | None

Length adjustment method.

None
method str | None

Glyph rendering method.

None
path str | None

Path data for text layout.

None
side str | None

Which side of path to render text.

None
spacing str | None

Glyph spacing handling.

None
startOffset str | float | None

Offset from path beginning.

None
textLength str | float | None

Text rendering width.

None
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
def __init__(
    self,
    *children: Any,
    href: str | None = None,
    lengthAdjust: str | None = None,
    method: str | None = None,
    path: str | None = None,
    side: str | None = None,
    spacing: str | None = None,
    startOffset: str | float | None = None,
    textLength: str | float | None = None,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))

Title

Title(
    *children, class_=None, id=None, style=None, **kwargs
)

Bases: CaseTag

Defines a title for the SVG document

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1900
1901
1902
1903
1904
1905
1906
1907
1908
def __init__(
    self,
    *children: Any,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))

Tspan

Tspan(
    *children,
    x=None,
    y=None,
    dx=None,
    dy=None,
    rotate=None,
    lengthAdjust=None,
    textLength=None,
    class_=None,
    id=None,
    style=None,
    **kwargs,
)

Bases: CaseTag

Defines a text span

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
x str | float | None

X-coordinates of text baseline.

None
y str | float | None

Y-coordinates of text baseline.

None
dx str | float | None

Horizontal shift from previous text.

None
dy str | float | None

Vertical shift from previous text.

None
rotate str | None

Rotation of individual glyphs.

None
lengthAdjust str | None

Text stretching method.

None
textLength str | float | None

Target width for text scaling.

None
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
def __init__(
    self,
    *children: Any,
    x: str | float | None = None,
    y: str | float | None = None,
    dx: str | float | None = None,
    dy: str | float | None = None,
    rotate: str | None = None,
    lengthAdjust: str | None = None,
    textLength: str | float | None = None,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))

Use

Use(
    *children,
    href=None,
    x=None,
    y=None,
    width=None,
    height=None,
    class_=None,
    id=None,
    style=None,
    **kwargs,
)

Bases: CaseTag

References another element

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
href str | None

Reference to element to duplicate.

None
x str | float | None

X offset transformation.

None
y str | float | None

Y offset transformation.

None
width str | float | None

Width (only for elements with viewBox).

None
height str | float | None

Height (only for elements with viewBox).

None
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
def __init__(
    self,
    *children: Any,
    href: str | None = None,
    x: str | float | None = None,
    y: str | float | None = None,
    width: str | float | None = None,
    height: str | float | None = None,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))

View

View(
    *children,
    viewBox=None,
    preserveAspectRatio=None,
    class_=None,
    id=None,
    style=None,
    **kwargs,
)

Bases: CaseTag

Defines a view

Parameters:

Name Type Description Default
children Any

Tags, strings, or other rendered content.

()
viewBox str | None

Viewport bounds.

None
preserveAspectRatio str | None

Aspect ratio handling.

None
class_ str | None

Substituted as the DOM class attribute.

None
id str | None

DOM ID attribute.

None
style str | None

Inline style attribute.

None
**kwargs str | int | float | bool

Additional attributes.

{}
Source code in src/air/tags/models/svg.py
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
def __init__(
    self,
    *children: Any,
    viewBox: str | None = None,
    preserveAspectRatio: str | None = None,
    class_: str | None = None,
    id: str | None = None,
    style: str | None = None,
    **kwargs: str | int | float | bool,
):
    super().__init__(*children, **kwargs | locals_cleanup(locals()))