- Prop
as- Type
React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined- Default
"div"- Requirement
- optional
- Description
- Polymorphic wrapper tag.
Docs Components Primitives
Reveal
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
const revealFixture = { id: "reveal", text: "Slides in once scrolled into view.",} satisfies { id: string; text: string }; import { Reveal } from "@grassroot/ui-react"; export default function RevealDemo() { return ( <div> <Reveal> <div className="rounded-xs border bg-card px-4 py-3">{revealFixture.text}</div> </Reveal> </div> );}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">const revealFixture = { id: "reveal", text: "Slides in once scrolled into view.",} satisfies { id: string; text: string }; import { Reveal } from "@grassroot/ui-vue";</script> <template> <div> <Reveal> <div class="rounded-xs border bg-card px-4 py-3">{{ revealFixture.text }}</div> </Reveal> </div></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { Component } from "@angular/core";const revealFixture = { id: "reveal", text: "Slides in once scrolled into view.",} satisfies { id: string; text: string }; import { GrassrootReveal } from "@grassroot/ui-angular"; @Component({ selector: "app-reveal-demo", standalone: true, imports: [GrassrootReveal], template: ` <div> <grassroot-reveal> <div class="rounded-xs border bg-card px-4 py-3">{{ fixture.text }}</div> </grassroot-reveal> </div> `,})export class RevealDemoComponent { protected readonly fixture = revealFixture;} export default RevealDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { Reveal } from "@grassroot/ui-svelte"; const revealFixture = { id: "reveal", text: "Slides in once scrolled into view.", } satisfies { id: string; text: string }; </script> <div> <Reveal> <div class="rounded-xs border bg-card px-4 py-3">{revealFixture.text}</div> </Reveal></div>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { Reveal } from "@grassroot/ui-solid";const revealFixture = { id: "reveal", text: "Slides in once scrolled into view.",} satisfies { id: string; text: string }; export default function RevealDemo() { return ( <div> <Reveal> <div class="rounded-xs border bg-card px-4 py-3">{revealFixture.text}</div> </Reveal> </div> );}Installation
API Reference
Import
import { Reveal } from "@grassroot/ui-react";
Props
Prop
Type
Default
Requirement
Description
asReact.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined"div"optional
Polymorphic wrapper tag.
delaynumber | undefined0optional
Stagger in ms (applied as transition-delay).
variant"slide" | "fade" | undefined"slide"optional
—
- Prop
delay- Type
number | undefined- Default
0- Requirement
- optional
- Description
- Stagger in ms (applied as transition-delay).
- Prop
variant- Type
"slide" | "fade" | undefined- Default
"slide"- Requirement
- optional
- Description
- —
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { Reveal } from "@grassroot/ui-vue";
Props
Prop
Type
Default
Requirement
asstring"div"optional
delaynumber0optional
variant"slide" | "fade""slide"optional
- Prop
as- Type
string- Default
"div"- Requirement
- optional
- Prop
delay- Type
number- Default
0- Requirement
- optional
- Prop
variant- Type
"slide" | "fade"- Default
"slide"- Requirement
- optional
Content regions
default
Import
import { Component } from "@angular/core";
import { GrassrootReveal } from "@grassroot/ui-angular";
Props
Prop
Type
Default
Requirement
delaynumber0optional
variant"slide" | "fade""slide"optional
- Prop
delay- Type
number- Default
0- Requirement
- optional
- Prop
variant- Type
"slide" | "fade"- Default
"slide"- Requirement
- optional
Content regions
default
Import
import { Reveal } from "@grassroot/ui-svelte";
Props
Prop
Type
Default
Requirement
asstring"div"optional
delaynumber0optional
variant"slide" | "fade""slide"optional
- Prop
as- Type
string- Default
"div"- Requirement
- optional
- Prop
delay- Type
number- Default
0- Requirement
- optional
- Prop
variant- Type
"slide" | "fade"- Default
"slide"- Requirement
- optional
Content regions
children
Import
import { Reveal } from "@grassroot/ui-solid";
Props
Prop
Type
Default
Requirement
asstring—
optional
delaynumber—
optional
variant"slide" | "fade"—
optional
classNamestring—
optional
styleJSX.CSSProperties | string—
optional
- Prop
as- Type
string- Default
- —
- Requirement
- optional
- Prop
delay- Type
number- Default
- —
- Requirement
- optional
- Prop
variant- Type
"slide" | "fade"- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
JSX.CSSProperties | string- Default
- —
- Requirement
- optional
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.