Feedback and toggles

Bookmark

BookmarkStateIcon

Switches between bookmarked and unbookmarked states.

States

2 total

Add bookmark

The item is not bookmarked.

Add bookmark

"unbookmarked"

The item is not bookmarked.

Remove bookmark

"bookmarked"

The item is bookmarked.

Implementation

Pass your current state.

The component stays presentational. Your application remains in control of async work and business logic. The state prop is a TypeScript string literal union — pass an invalid state and you'll get a type error at build time.

Source
Lucide
License
ISC
States
unbookmarked · bookmarked
example.tsx
import { BookmarkStateIcon } from "@stateglyph/react";
<BookmarkStateIcon state="unbookmarked" decorative />