Skip to content

⚠ Early release: v0.3.2.sophistry is not ready for production use. Until 1.0, any minor release may break the API; expect missing features and bugs too.Stability and versioning

Shapes and styling

Every visible thing in sophistry is a node in the scene graph, made from a definition: circle.create(props) in the core, <Circle> in the Solid and React bindings (each component is generated from its definition, so the props are the same). This guide tours the primitives and the props they all share, so once you know how to style a Circle you know how to style everything else.

Shapes gallery

The basic shapes, each styled with stroke, fill and opacity; colors come from the active theme.

ShapesGallery.tsx
10 collapsed lines
import { derive } from "@sophistry/core";
import {
Arrow,
Circle,
Polygon,
Rect,
Stage,
Star,
useScene,
} from "@sophistry/solidjs";
function Shapes() {
const theme = useScene().theme;
const series = (i: number) => derive(theme, (t) => t.palette.series[i]);
return (
<>
<Circle
center={{ x: -4.4, y: 0 }}
radius={0.9}
stroke={series(0)}
fill={series(0)}
/>
<Rect
center={{ x: -2.2, y: 0 }}
width={1.8}
height={1.4}
cornerRadius={0.2}
stroke={series(1)}
fill={series(1)}
fillOpacity={0.35}
/>
<Polygon sides={6} radius={1} stroke={series(2)} fill={series(2)} />
<Star
center={{ x: 2.2, y: 0 }}
outerRadius={1}
stroke={series(3)}
fill={series(3)}
fillOpacity={0.5}
strokeWidth={0.08}
/>
<Arrow
from={{ x: 3.6, y: -0.8 }}
to={{ x: 5.2, y: 0.8 }}
stroke={series(4)}
strokeWidth={0.08}
/>
</>
);
}
export default function ShapesGallery() {
return (
<Stage units={12}>
<Shapes />
</Stage>
);
}

Names follow Manim’s where a Manim equivalent exists. The table lists the binding components; each has a lowercase definition in @sophistry/core (Circle is circle, SurroundingRectangle is surroundingRectangle). All sizes are in scene units, y up.

Purpose Components
Circles and ellipses Circle, Ellipse, Dot, AnnotationDot, LabeledDot
Arcs and rings Arc, ArcBetweenPoints, Sector, Annulus, AnnularSector
Polygons Rect (cornerRadius rounds corners), Square, Polygon (explicit points, or radius + sides), Star, Polygram, RegularPolygram
Lines and arrows Line, DashedLine, Arrow, DoubleArrow, Vector, CurvedArrow, CurvedDoubleArrow
Curves CubicBezier, QuadraticBezier, Path (points, curvePoints or an SVG pathData), Plot (a parametric function(t) in scene units)
Angles Angle, RightAngle, Elbow
Matchers SurroundingRectangle, BackgroundRectangle, Cross, Underline, Brace
Text and numbers Text, BulletedList, Title, DecimalNumber, Integer, Variable (LaTeX lives in Math and LaTeX)
Containers Group, LinearTransform
Plotting Axes, NumberPlane, NumberLine, FunctionGraph, … see Coordinate systems

Each shape takes its own geometry props (center/radius for a circle, from/to for a line) on top of the shared ones below. Your editor shows every prop, with its type and default, from the package’s types (see API).

Arrows are tipped lines: tipShape picks the head ("triangle", "stealth", "circle", "square", "vee"), tipAt puts it on "end" (the default), "start" or "both", and closed tips fill with the stroke color unless you pass tipFill.

Vector with components

A Vector grows out of the origin of a NumberPlane, then dashed lines drop to the axes to show its x and y components.

VectorArrow.tsx
10 collapsed lines
import { derive, draw, track } from "@sophistry/core";
import {
DashedLine,
NumberPlane,
Stage,
Text,
usePlayer,
Vector,
} from "@sophistry/solidjs";
import { onSettled } from "solid-js";
export default function VectorArrow() {
const { play } = usePlayer();
const arrow = track(0);
const parts = track(0);
onSettled(() => {
void (async () => {
await play(draw(arrow, { duration: 1.2 }));
await play(draw(parts, { duration: 0.8 }));
})();
});
return (
<Stage units={12}>
<NumberPlane xRange={[-4, 4]} yRange={[-3, 3]} width={8} height={6} />
<Vector to={{ x: 3, y: 2 }} strokeWidth={0.08} progress={arrow} />
{/* Dropped from the tip to each axis. */}
<DashedLine from={{ x: 3, y: 2 }} to={{ x: 3, y: 0 }} progress={parts} />
<DashedLine from={{ x: 3, y: 2 }} to={{ x: 0, y: 2 }} progress={parts} />
{/* Each beside its own dashed line, clear of the axes' numbers and the shaft. */}
<Text text="x = 3" x={3.65} y={1} opacity={parts} />
<Text text="y = 2" x={1.5} y={2.35} opacity={parts} />
{/* Arrives with the tip it names. */}
<Text
text="v = (3, 2)"
x={3.95}
y={2.45}
opacity={derive(arrow, (drawn) => Math.max(0, (drawn - 0.7) / 0.3))}
/>
</Stage>
);
}

Every geometric shape accepts the same ShapeProps:

Prop Meaning
stroke, fill A CSS color, a gradient, or "none". Unset stroke is the theme foreground; unset fill means no fill.
strokeWidth Outline thickness in scene units (not pixels), so it scales with the stage.
opacity, fillOpacity 0 to 1. fillOpacity multiplies on top of opacity.
dash, dashOffset Dash pattern in scene units, e.g. [0.2, 0.1].
lineCap, lineJoin Canvas caps and joins. Both default to "round".
progress The arc-length reveal, 0 to 1 (see below).
zIndex, visible Paint order and removal from the frame.
x, y, rotation, scale, origin, place The shape’s own transform.
label, onTap, hover, drag, … Everything in Interaction.

Every prop takes a plain value or a Readable. Pass a track itself (opacity={fade}, or circle.create({ opacity: fade })) and the node binds to it: a write reruns only the stage that prop invalidates (an opacity write restyles; a center write only moves), with no framework code per frame. A Solid signal or a React re-render also works (the binding calls node.set for the changed key), which suits values the user changes rather than ones that animate. There is no ref handle object: the node a component returns, or ref={(node) => ...} receives, is itself the handle.

Geometry takes stroke and fill; text and single-colour marks (Dot, LabeledDot, Text, DecimalNumber) take color, which fills the mark and is its default outline. No component takes both fill and color; see Naming conventions.

progress is always the arc-length reveal: the fraction of the outline drawn so far, default 1. It is the prop that draw() and erase() drive. Components that morph one thing into another (TransformMatchingShapes, MathTransform) have no reveal, so they call their 0 to 1 amount blend instead.

3 collapsed lines
import { draw, track } from "@sophistry/core";
import { Circle, Stage, usePlayer } from "@sophistry/solidjs";
import { onSettled } from "solid-js";
function Ring() {
const drawn = track(0);
const player = usePlayer();
onSettled(() => void player.play(draw(drawn, { duration: 1.5 })));
return <Circle radius={1.5} stroke="#58c4dd" fill="#58c4dd" fillOpacity={0.2} progress={drawn} />;
}
export function Reveal() {
return (
<Stage units={6}>
<Ring />
</Stage>
);
}

x, y, rotation (radians, counter-clockwise), scale and origin move a shape without touching its geometry. rotation and scale pivot about origin, which defaults to the shape’s center. place takes the result of a placement helper and adds to x/y; see Layout.

Geometry props (center, from, points) say what the shape is; the transform props say where it was put. Both are cheap to animate: a circle’s center and every transform prop invalidate only the node’s matrix (Invalidate.TRANSFORM), so its outline keeps its identity and the renderer’s path cache stays warm. Props that change the outline itself (radius, points) rebuild it.

A <Group> transforms and dims everything inside it. It takes x, y, rotation, scale, scaleY, origin and opacity. Groups nest, and transforms and opacities compose down the tree. Strokes and text scale with the group.

Group transforms

A Group moves, rotates and scales everything inside it at once; here two scaled copies of a small figure turn together.

GroupTransforms.tsx
10 collapsed lines
import { hold, track, valueTo } from "@sophistry/core";
import {
Circle,
Group,
Line,
Square,
Stage,
usePlayer,
} from "@sophistry/solidjs";
import { onSettled } from "solid-js";
function Figure() {
return (
<>
<Square size={1.2} />
<Circle center={{ x: 1.2, y: 0 }} radius={0.3} />
<Line from={{ x: 0.6, y: 0 }} to={{ x: 0.9, y: 0 }} />
</>
);
}
export default function GroupTransforms() {
const { play, signal } = usePlayer();
const angle = track(0);
onSettled(() => {
void (async () => {
while (!signal.aborted) {
await play(valueTo(angle, Math.PI * 2, { duration: 4 }));
angle.set(0);
await play(hold(0.5));
}
})();
});
return (
<Stage units={10}>
<Group x={-2.8} rotation={angle}>
<Figure />
</Group>
<Group x={2.3} rotation={angle} scale={1.6} opacity={0.6}>
<Figure />
</Group>
</Stage>
);
}

A group is a container node: it hands its children a coordinate space (matrix, opacity, clip), and a change to it marks only their transforms dirty, never their outlines. Its children still paint in one global order (tree order plus zIndex), so a group does not form a layer of its own. zIndex is not a group prop; give the children their own.

clip paints a group’s children only inside a region: a box ({ minX, minY, maxX, maxY }), a polygon (Point[]), or several rings (filled by the non-zero rule, so a ring wound the other way is a hole). The region is stated in the group’s own units, the ones its children are written in, so it moves, turns and scales with the group. Nested clips intersect. What a clip hides is not hit either: a tap outside the region goes to whatever is behind it, and focus rings shrink to the visible part.

The prop is reactive, so a region that follows a track is a wipe:

Clipping a group

A <Group clip> paints its children only inside a region. Here the clip's right edge follows a track, wiping a coloured copy over a grey one.

ClipWipe.tsx
3 collapsed lines
import { derive, sequence, track, valueTo } from "@sophistry/core";
import { Circle, Group, Line, Stage, usePlayer } from "@sophistry/solidjs";
import { onSettled } from "solid-js";
const dots = Array.from({ length: 35 }, (_, i) => ({
x: (i % 7) - 3,
y: Math.floor(i / 7) - 2,
}));
export default function ClipWipe() {
const { play, signal } = usePlayer();
const edge = track(-4);
onSettled(() => {
void (async () => {
while (!signal.aborted) {
await play(
sequence(
valueTo(edge, 4, { duration: 2 }),
valueTo(edge, -4, { duration: 2 }),
),
);
}
})();
});
const picture = (color: string) =>
dots.map((d) => (
<Circle center={d} radius={0.35} fill={color} stroke="none" />
));
return (
<Stage units={10}>
{picture("#8a8a8a")}
<Group
clip={derive(edge, (x) => ({ minX: -4, minY: -3, maxX: x, maxY: 3 }))}
>
{picture("#58c4dd")}
</Group>
<Line
from={derive(edge, (x) => ({ x, y: -3 }))}
to={derive(edge, (x) => ({ x, y: 3 }))}
/>
</Stage>
);
}

Clipping a thousand marks costs about as much as clipping one: the renderer installs a group’s clip once.

zIndex sorts, and higher draws later. Ties paint in tree order: the order of the nodes in the scene graph, which in JSX is the order the components appear in, not the order they happened to mount in. A shape that appears later inside a <Show> paints where it is written, and reordering a <For> (or container.setChildren with a new order) reorders painting.

The same order drives <Camera> layering and the keyboard tab order (how it works).

Use zIndex when an order must not depend on the tree at all. BackgroundRectangle defaults to zIndex: -1; if the shape it covers has an explicit zIndex, sort the two by hand. Custom shapes take part in the same order as any node; see Extending.

visible={false} removes a shape from the frame entirely.

SurroundingRectangle, BackgroundRectangle, Cross and Underline wrap a target: a node or a box. Given a node, a matcher follows it: it listens to the node’s props and re-measures its bounds() when the node is moved, resized, retexted or restyled.

2 collapsed lines
import type { SceneNode } from "@sophistry/core";
import { Circle, Stage, SurroundingRectangle } from "@sophistry/solidjs";
export function Boxed() {
let circle!: SceneNode;
return (
<Stage units={8}>
<Circle ref={(node) => (circle = node)} radius={1} />
<SurroundingRectangle target={circle} padding={0.2} cornerRadius={0.15} />
</Stage>
);
}

In the core the same is surroundingRectangle.create({ target: ringNode, padding: 0.2 }). A matcher does not see changes that reach its target from elsewhere (an enclosing group moving, a font arriving); for those, bind target to a derive that returns the box. A null or undefined target draws nothing. The box is axis-aligned in the stage’s units, so wrapping something inside a rotated group gives you its upright bounding box.

Brace is the matcher that measures. Give it a target box and a direction (DOWN by default; any vector works, not only the four sides) and it runs along that side, gap away, with its tip pointing out. Give it from and to instead to brace any segment, such as a triangle’s hypotenuse: the tip points to the right of the way from from to to, so swap them to flip it, and gap pushes it off the segment. label puts text at the tip, which covers Manim’s BraceLabel.

<Brace target={box.bounds()} direction={DOWN} label="width" />
<Brace from={c} to={a} gap={0.15} label="c" />

A brace is a filled shape, so fill colors it (the theme’s foreground by default) and the label takes the same color unless you pass labelColor. Its depth and thickness stay the same whatever its length, as Manim’s do, so braces under a letter and under a whole equation look alike. progress draws it like any other shape, and the label follows. The bare geometry is braceRings, braceTip and braceSpan in @sophistry/core/geometry.

Braces

Braces measure a rectangle's sides and a triangle's hypotenuse, each with a label at its tip, drawn in one after another.

BraceAnnotations.tsx
4 collapsed lines
import type { SceneNode } from "@sophistry/core";
import { DOWN, draw, lagged, RIGHT, track } from "@sophistry/core";
import { Brace, Polygon, Rect, Stage, usePlayer } from "@sophistry/solidjs";
import { onSettled } from "solid-js";
const A = { x: 1.5, y: -1.5 };
const B = { x: 5, y: -1.5 };
const C = { x: 5, y: 1.5 };
export default function BraceAnnotations() {
const { play } = usePlayer();
const braces = [track(0), track(0), track(0)];
// The node is the handle: the rectangle exists before the braces read its bounds.
let box!: SceneNode;
onSettled(() => {
void play(
lagged(
braces.map((b) => draw(b)),
{ lagRatio: 0.6 },
),
);
});
return (
<Stage units={12}>
<Rect
ref={(node) => (box = node)}
center={{ x: -2.5, y: 0 }}
width={4}
height={2}
/>
<Brace
target={box.bounds()}
direction={DOWN}
label="width"
progress={braces[0]}
/>
<Brace
target={box.bounds()}
direction={RIGHT}
label="h"
progress={braces[1]}
/>
<Polygon points={[A, B, C]} />
{/* C to A: the tip points to the right of travel, away from the triangle. */}
<Brace from={C} to={A} gap={0.15} label="c" progress={braces[2]} />
</Stage>
);
}

Text draws text: one line, several (a "\n" breaks), or a block wrapped to a width in scene units. DecimalNumber, Integer and Variable draw numbers that update when their value does, and valueTo makes them count. Typeset maths goes through LaTeX as geometry.

<Text text="x²" x={1} fontSize={0.5} />
<Text
width={5}
text={["The ", { text: "derivative", fontWeight: 700, color: BLUE }, " measures ", { text: "change", italic: true, underline: true }, "."]}
/>

text takes a string, or strings and spans in reading order. A span sets any of fontSize, color, fontFamily, fontWeight, italic, letterSpacing and opacity for its run, and can add an underline, a strikethrough or a highlight colour behind it; what it leaves out comes from the node. Each line is as tall as its largest font times lineHeight (1.3 by default).

Text is centred on x/y. align and baseline move the anchor (baseline="alphabetic" puts the first line’s baseline on it), and align also sets how lines sit in a block unless textAlign says otherwise: a centred block of left-aligned lines is textAlign="left". The node measures as the box of the whole block, so nextTo, arrange and SurroundingRectangle treat it as one thing. Canvas2D can’t trim glyph outlines, so progress writes text in reading order glyph by glyph, each glyph fading in whole.

Lines break where the browser would, between words across spans, using the same measurements the canvas draws with. Without a canvas (server rendering, tests) the breaks fall at spaces from an estimate of each word’s width. layoutText(runs, { width }) is the layout on its own, if you place text yourself.

Any scene node can sit inside a line, like one wide glyph: put { inline: node } among the runs. A formula mid-sentence or a coloured dot as a legend key keeps scene units (scaled with the text’s group), lines break around it as around a word, and its line grows to hold it. A formula sits on its own baseline; other nodes are centred on the text, or say where the baseline crosses them with baseline (up from their bottom edge). The text owns its inline nodes: one dropped from text is disposed, and one that changes size lays the text out again.

3 collapsed lines
import { circle, YELLOW } from "@sophistry/core";
import { Text } from "@sophistry/solidjs";
import { mathTex } from "@sophistry/text";
export const Sentence = () => (
<Text
width={6}
text={[
"The roots of ",
{ inline: mathTex.create({ tex: "ax^2 + bx + c", fontSize: 0.4 }) },
" are marked ",
{ inline: circle.create({ radius: 0.08, fill: YELLOW, stroke: "none" }) },
".",
]}
/>
);

Formulas inside sentences

Any scene node can sit in a line of text like a wide glyph: a typeset formula mid-sentence and a coloured dot as a legend key, wrapping with the words around them.

InlineFormula.tsx
3 collapsed lines
import { BLUE, circle, YELLOW } from "@sophistry/core";
import { Box, Stage, Text } from "@sophistry/solidjs";
import { mathTex } from "@sophistry/text";
const INK = "#e6edf5";
export default function InlineFormula() {
return (
<Stage>
<Box
style={{
width: 1100,
padding: 56,
gap: 32,
flexDirection: "column",
background: "#16202e",
borderRadius: 32,
color: INK,
fontSize: 44,
}}
>
<Text
text={[
"The roots of ",
{
inline: mathTex.create({
tex: "ax^2 + bx + c",
fontSize: 0.42,
fill: INK,
}),
},
" are ",
{
inline: mathTex.create({
tex: "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}",
fontSize: 0.42,
fill: INK,
}),
},
", real exactly when the discriminant is not negative.",
]}
/>
<Text
fontSize={34}
text={[
{
inline: circle.create({
radius: 0.1,
fill: BLUE,
stroke: "none",
}),
},
" measured ",
{
inline: circle.create({
radius: 0.1,
fill: YELLOW,
stroke: "none",
}),
},
" predicted",
]}
/>
</Box>
</Stage>
);
}

Two presets are built from Text:

  • BulletedList gives each of its items a bullet, with a hanging indent when an item wraps. bullet, indent and itemGap adjust it; items take spans too, and progress writes it an item at a time.
  • Title is a heading at the top of the frame with a rule under it. The rule spans the frame, or only the text with matchUnderlineToText; underline={false} drops it.

Text blocks, lists and titles

A title with its rule, rich text wrapped to a measure and a bulleted list, each written in reading order or an item at a time.

TextBlocks.tsx
9 collapsed lines
import { BLUE, lagged, track, valueTo } from "@sophistry/core";
import {
BulletedList,
Stage,
Text,
Title,
usePlayer,
} from "@sophistry/solidjs";
import { onSettled } from "solid-js";
export default function TextBlocks() {
const { play } = usePlayer();
const title = track(0);
const paragraph = track(0);
const list = track(0);
onSettled(() => {
void play(
lagged(
[title, paragraph, list].map((t) =>
valueTo(t, 1, { duration: 1.5, easing: "linear" }),
),
{ lagRatio: 0.8 },
),
);
});
return (
<Stage units={14}>
<Title text="Continuity" progress={title} />
<Text
x={-3}
y={0.6}
width={6}
fontSize={0.36}
textAlign="left"
text={[
"A function is ",
{ text: "continuous", fontWeight: 700, color: BLUE },
" at a point when small changes in its input give small changes in its output. Nothing ",
{ text: "jumps", italic: true },
", and nothing is ",
{ text: "missing", underline: true },
".",
]}
progress={paragraph}
/>
<BulletedList
x={3.8}
y={0.6}
fontSize={0.36}
items={["No jumps", "No holes", "No vertical asymptotes"]}
progress={list}
/>
</Stage>
);
}

fill and stroke take a gradient wherever they take a color:

2 collapsed lines
import { radialGradient, sheen } from "@sophistry/core";
import { Circle, Rect, Stage } from "@sophistry/solidjs";
export function Lit() {
return (
<Stage units={8}>
<Circle center={{ x: -2, y: 0 }} radius={1.5} fill={radialGradient(["#ffffff", "#4dabf7", "#14213d"], { from: { x: 0.35, y: 0.7 } })} />
<Rect center={{ x: 2, y: 0 }} width={3} height={2} fill={sheen("#4dabf7", { at: 0.6 })} />
</Stage>
);
}
  • linearGradient(colors, { angle | from, to, offsets, units }) runs along an axis. The default axis is left to right.
  • radialGradient(colors, { from, to, fromRadius, toRadius, offsets, units }). Offsetting from from to is what makes a sphere read as lit.
  • sheen(base, { at, width, factor, angle, highlight }) is a lighter band laid across a shape. at is an ordinary option, so a derive of a track slides the highlight (fill={derive(at, (at) => sheen(base, { at }))}) and valueTo animates it like anything else.

Endpoints are fractions of the shape’s own bounding box by default, so a gradient moves, turns and scales with the shape that wears it. units: "scene" pins it to absolute scene coordinates instead, for light the shapes travel through. Gradients stay correct through every <Camera>.

For colour along a curve, use strokeAlong: a list of colours (often a colorRamp) spread over the outline by arc length. A gradient stroke runs along a straight axis instead. “Left is cold, right is hot” is a gradient; “the path heats up as it goes” is strokeAlong.

Gradients and strokes

A lit sphere, a sheen that sweeps across a card, a dashed line and a stroke whose color follows the curve.

GradientsAndStrokes.tsx
19 collapsed lines
import {
colorRamp,
derive,
radialGradient,
sheen,
track,
valueTo,
} from "@sophistry/core";
import {
Circle,
DashedLine,
Path,
Rect,
Stage,
Text,
usePlayer,
useScene,
} from "@sophistry/solidjs";
import { onSettled } from "solid-js";
const wave = Array.from({ length: 60 }, (_, i) => ({
x: -1.6 + (i / 59) * 3.2,
y: -0.9 + 0.5 * Math.sin((i / 59) * Math.PI * 3),
}));
function Swatches() {
const { play, signal } = usePlayer();
const series = derive(useScene().theme, (theme) => theme.palette.series);
const at = track(0);
onSettled(() => {
void (async () => {
while (!signal.aborted) {
at.set(0);
await play(valueTo(at, 1, { duration: 2.5, easing: "linear" }));
}
})();
});
return (
<>
<Circle
center={{ x: -3.6, y: 0.6 }}
radius={1.3}
strokeWidth={0}
fill={derive(series, (s) =>
radialGradient(["#ffffff", s[0], "#14213d"], {
from: { x: 0.35, y: 0.7 },
}),
)}
/>
<Text text="radialGradient" x={-3.6} y={-1.3} fontSize={0.3} />
<Rect
center={{ x: 0, y: 0.6 }}
width={3}
height={2}
cornerRadius={0.25}
// From fully off one side of the card to fully off the other.
fill={derive([series, at], (s, at) =>
sheen(s[1], { at: at * 1.7 - 0.35 }),
)}
stroke={derive(series, (s) => s[1])}
/>
<Text text="sheen, animated by at" y={-1.3} fontSize={0.3} />
<Path
points={wave.map((p) => ({ x: p.x + 3.6, y: p.y + 1.5 }))}
strokeWidth={0.14}
strokeAlong={derive(series, (s) => {
const heat = colorRamp([s[2], s[3], s[4]], { colorSpace: "oklch" });
return Array.from({ length: 24 }, (_, i) => heat(i / 23));
})}
/>
<DashedLine
from={{ x: 2, y: -0.2 }}
to={{ x: 5.2, y: -0.2 }}
dashLength={0.18}
strokeWidth={0.06}
stroke={derive(series, (s) => s[3])}
/>
<Text text="strokeAlong + DashedLine" x={3.6} y={-1.3} fontSize={0.3} />
</>
);
}
export default function GradientsAndStrokes() {
return (
<Stage units={12}>
<Swatches />
</Stage>
);
}

Annulus is the one shape that leans on the canvas fill rule: its inner ring is wound backwards so the non-zero rule punches a real hole. Anything more elaborate, such as a hole in an arbitrary Path, wants explicit winding control, which is not exposed yet.

  • Layout to position shapes relative to each other.
  • Theming and color for the palette behind every default.
  • Animation to drive progress, opacity and the transform props.